This is a sample source code for the article published on Toptal: https://www.toptal.com/nodejs/secure-rest-api-in-nodejs
This sample is published as part of the corresponding article at the Toptal Engineering Blog. Visit https://www.toptal.com/developers/blog and subscribe to our newsletter to read great posts!
mongod.exe
npm install
or yarn
in your root project folderTo run the project, please use a command line the following:
npm start
If you are familiar to docker and you have docker installed on your machine and just want to run the project without issues please do:
I've created a 2020 version of this project using Typescript. If you might be interested on it, please check the following repository: https://github.com/makinhs/expressjs-api-tutorial
findOneAndUpdate
to simplify PATCH code.localhost
to simplify first-time setup.