Let's Just Blog-106
Web Development with ExpressJS? Following Let's Just Blog-105 , and git hub repo letjustblog-mean we learned how to spin a appserver and use angular attribute to serve web page. In this blog, we will dig a bit deeper into the features of expressJS for serving HTML content and enable different routes. We will rely on templating engine like PUG, EJS to serve dynamic content. Housekeeping Tasks for Express App 1) Create a Node App with npm init. Install the Express module. npm install express --save 2) Import the express module with the require function. Create the Express App with express function. const express = require('express'); const app = express(); 2) Install other modules to enable the express App. We will also use Express Router to enable elegant routing in the Express App. const bodyParser = require('body-parser'); const router = express.Router(); 3) Create a server using http node module and pass the express app as a parameter to crea...