May 2018
Intermediate to advanced
470 pages
13h 54m
English
The user API endpoints exposed by the Express app will allow the frontend to do CRUD operations on the documents generated according to the user model. To implement these working endpoints, we will write Express routes and corresponding controller callback functions that should be executed when HTTP requests come in for these declared routes. In this section, we will look at how these endpoints will work without any auth restrictions.
The user API routes will be declared using Express router in server/routes/user.routes.js, and then mounted on the Express app we configured in server/express.js.
mern-skeleton/server/express.js:
import userRoutes from './routes/user.routes'...app.use('/', userRoutes)...
Read now
Unlock full access