April 2020
Intermediate to advanced
716 pages
18h 55m
English
To use Express, we will install it and then add and configure it in the server/express.js file.
From the command line, run the following command to install the express module and to have the package.json file automatically updated:
yarn add express
Once Express has been installed, we can import it into the express.js file, configure it as required, and make it available to the rest of the app.
mern-skeleton/server/express.js:
import express from 'express'const app = express() /*... configure express ... */export default app
To handle HTTP requests and serve responses properly, we will use the following modules to configure Express:
Read now
Unlock full access