April 2020
Intermediate to advanced
716 pages
18h 55m
English
The user routes that are defined in the user.routes.js file will use express.Router() to define route paths with the relevant HTTP methods and assign the corresponding controller function that should be called when these requests are received by the server.
We will keep the user routes simplistic by using the following:
The resulting user.routes.js code will look as follows (without the auth considerations that need to be added for protected routes).
mern-skeleton/server/routes/user.routes.js:
import express from 'express' ...
Read now
Unlock full access