In this step, you will use your User
model to implement a registration/login system for a small but amazing website.
Here's how it will look when it's done.
Before you dive in, watch this short video about how to organize GET/POST routes.
Continuing in the same working directory, start server.js
with node and prepare yourself for the awesome.
server.js
) so that it works with those other parts.
See the checklist below and the extensive comments in server.js
.
testguy/testguyAnd an admin username/password:
admin/admin
/
GET route/login
GET and POST routes/register
GET and POST routes/content
GET route/logout
GET route is already completed, note how it removes the user from session