Hi, I'm mithushan. In this blog I am writing what I learn from online or other resources.

Sunday, April 28, 2019

Express


What is Express?

Express is a minimal and flexible Node.js web application framework that provides a robust set of features to develop web and mobile applications. It facilitates the rapid development of Node based Web applications.


  • Features of Express framework
    • Allows to set up middlewares to respond to HTTP Requests.
    • Defines a routing table which is used to perform different actions based on HTTP Method and URL.
    • Allows to dynamically render HTML Pages based on passing arguments to templates.
  • How to install Express in ubuntu
    • $ npm install express --save
  • body-parser
    • This is a node.js middleware for handling JSON, Raw, Text and URL encoded form data. 
    • $ npm install body-parser –save
  • cookie-parser
    • Parse Cookie header and populate req.cookies with an object keyed by the cookie names. 
    • $ npm install cookie-parser –save
  • multer
    • This is a node.js middleware for handling multipart/form-data.
    • $ npm install multer --save
Reference: https://www.tutorialspoint.com/expressjs/ 

           https://blog.vanila.io/setup-basic-server-with-express-framework-37b2ec749a6d

2 comments: