Follow me: Instagram
- Middlewares: use.static
- GET
- POST
- PUT
- DELETE
- PATCH
- Installed middleware 'CORS' with 'yarn add cors'.
Cross-Origin Resource Sharing (CORS) is an HTTP-header based mechanism that allows a server to indicate any origins (domain, scheme, or port) other than its own from which a browser should permit loading resources. CORS also relies on a mechanism by which browsers make a "preflight" request to the server hosting the cross-origin resource, in order to check that the server will permit the actual request. In that preflight, the browser sends headers that indicate the HTTP method and headers that will be used in the actual request. More...
A URI (Uniform Resource Identifier) is a string that refers to a resource. The most common are URLs, which identify the resource by giving its location on the Web. More...
useNewUrlParser, useUnifiedTopology, useFindAndModify, and useCreateIndex are no longer supported options. Mongoose 6 always behaves as if useNewUrlParser, useUnifiedTopology, and useCreateIndex are true, and useFindAndModify is false. Please remove these options from your code.
// No longer necessary:
mongoose.set('useFindAndModify', false);
await mongoose.connect('mongodb://localhost:27017/test', {
useNewUrlParser: true, // <-- no longer necessary
useUnifiedTopology: true // <-- no longer necessary
});
- Created validateFields and /validator/user.js More...
- Official documentation
- All validators
heroku config:set ENVIRONMENT_VARIABLE_NAME=valueText123ABC
git push heroku main
heroku logs -n 100 --tail
https://web-rest-server-nodejs.herokuapp.com
https://developers.google.com/identity/gsi/web/guides/overview