Set up Express middlewares to show HTTP request info on server log, including request time, method, path and the duration between request and response.
For example, 2020-10-21 22:38:05 | GET from /new | 15ms
- Node.js: v10.15.0
- npm: 6.4.1
- nodemon: 2.0.4
- express: 4.17.1
- Enter
git clone https://github.com/Kaikai8888/express-middleware-practe.git
in the terminal to download the project folder - Use robo 3T to manipulate mongoDB, create connection to
localhost: 27017
, and create the database,expense-tracker
- Enter
npm run dev
in the terminal to run app.js with nodemon to start local server - Enter http://localhost:3000 in the browser and enter the website