Open In App

Express.js express() function Complete Reference

Last Updated : 01 Nov, 2023
Improve
Improve
Like Article
Like
Save
Share
Report

Express.js is a small framework that works on top of Node.js web server functionality to simplify its APIs and add helpful new features. It makes it easier to organize your application’s functionality with middleware and routing.

Express.js express() Methods:

Method

Description

Express.js express.json() Function

The express.json() function is a built-in middleware function in Express. It parses incoming requests with JSON payloads and is based on body-parser.

Express.js express.raw() Function

The express.raw() function is a built-in middleware function in Express. It parses incoming request payloads into a Buffer and is based on body-parser

Express.js express.Router() Function

The express.Router() function is used to create a new router object. This function is used when you want to create a new router object in your program to handle requests.

Express.js express.static() Function

The express.static() function is a built-in middleware function in Express. It serves static files and is based on serve-static.

Express.js express.text() Function

The express.text() function is a built-in middleware function in Express. It parses the incoming request payloads into a string and is based on body-parser.

Express.js express.urlencoded() Function

The express.urlencoded() function is a built-in middleware function in Express. It parses incoming requests with URL-encoded payloads and is based on a body parser.


Like Article
Suggest improvement
Previous
Next
Share your thoughts in the comments

Similar Reads