Create a REST API with Node js & Express
app.js:- const express = require ( "express" ); const http = require ( "http" ); require ( "./db/connection" ); const router = require ( "./api/emp/index" ) const employee = require ( "./api/emp/model" ); const app = express (); const server = http . createServer ( app ); const port = process . env . PORT || 3000 ; const ip = process . env . IP || "localhost" ; app . use ( express . json ()) app . use ( router ) server . listen ( port , ip , () => { console . log ( "Express Server Listening on http://%s:%d" , ip , port ); }) --------------------------------- connection.js: const mongoose = require ( 'mongoose' ); mongoose . connect ( 'mongodb://127.0.0.1:27017/EMPDB' ). then (() => { console . log ( "MongoDb Connection Sucessfull...." ); }). catch (( e ) => { console . log ( "Mongodb connection Failed!!!" ); }) ------------------------------ Model...