Understanding Routing in Node.JS with Express 4

Node makes application development hell lot easier and on top of the Express make it fun to quick spin up application. In this article we will be discussing routing mechanism in node.js using Express. I recommend reading express documentation on routing which are self-explanatory, but here is quick example routing in Node.js

Let begin by creating a user database, I have added sample json you can also generate sample json here

Nodemon - I used nodemon for this example, I recommend using nodemon for your node application to monitor your node changes, lets generate our package.json. In here I created index.js as landing page for our application

You May Also Like

0
comments

About me

Hi. I’m Enterprise Architect (IT) at Intuitive Surgical Inc , building worlds smartest and largest surgical robots and binding business systems with cloud. I’m Founder of OyeCode. I have worked with Salesforce.com as Technical Architect (HQ) in San Francisco and designed/developed the cutting edge Salesforce Product Trailhead . I enjoy development on Salesforce, Heroku, Rails and other cloud based platform