Express.js express() function Complete Reference
Last Updated :
01 Nov, 2023
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:
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.
|
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
|
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.
|
The express.static() function is a built-in middleware function in Express. It serves static files and is based on serve-static.
|
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.
|
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.
|
Share your thoughts in the comments
Please Login to comment...