Step 4: -Install Middleware Install middleware using command npm i morgan i.e. HTTP request logger middleware for node.jsconst morgan = require('morgan'); if (process.env.... READ MORE >>
Step 4: -Install Middleware Middleware=>auth.js const jwt = require('jsonwebtoken'); const asyncHandler = require('./async'); const ErrorResponse = require('../util/errorResponse'); const user = require('../models/login'); //Protect... READ MORE >>
Step 3: -Setup Server for production and development Create a new folder with name config and then inside it create new file with name config.env. NODE_ENV=DEVELOPMENT PORT=5000 Import and Use Dependency in server.js // Import... READ MORE >>
Step 2: -Setup API Project Download NodeJSCreate a new folder with any NameOpen this folder with any Editor like VS CodeCrete a file Server.js for the entry pointCrete package. json file via npm init command on terminal by use ctrl ~... READ MORE >>
Recent Comments