How to write production-ready Node.js Rest API — Javascript version
A step by step guide with an example
Published in
7 min readFeb 14, 2019
This article list out all the necessary ingredients for the production-ready Node.js rest API with plain vanilla javascript. I want to categorize this into two phases
- Development Phase
- Production Phase
Let’s not complicate things and create simple user API where you get a list of users with Get request and save a user with the post request. Since we are focussing on the Node.js rest API, let's go with the simple API. let’s download all the tools required for the project.
Tools Required:
- Node.js (https://nodejs.org/en/)
- Visual studio code (https://code.visualstudio.com/)
- nodemon
- express
- eslint
- webpack
For complete project
git clone https://github.com/bbachi/prod-ready-node-rest-api.git
follow the below article for step by step process
Development Phase
- Initial setup
- nodemon
- Logging