You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Module 4: Backend Development with Node.js and MongoDB
Task 4:
Implement a basic user authentication system using JWT in a Node.js application.
Assignment:
1. Set up a simple Express server with routes to register and login users.
2. Use JWT (JSON Web Tokens) to authenticate users.
3. Implement registration and login endpoints.
4. Ensure users can only access protected routes if they are logged in (JWT required).
Deliverables:
● A Node.js server with JWT authentication.
● Registration and login routes.
● A protected route that requires authentication.
Record Log:
2/14/2025:
started & filled in README file 14:00 - 14:20
re-researched & re-studied JWT 14:20 - 14:50
set up express & node.js server 15:00 - 15:20
have basic JWL backend template in 15:20 - 15:45
more planning (thinking how to do frontend) 15:45 - 16:00
2/16/2025:
current goal is to set up the front end side of things (the actual webpage/interface) 11:00
remade backend 11:00 - 11:30
okay so, I'm confused as to if I'm supposed to have a designated front end website, or
just have it run off of POST commands via something like Insomnia
most of my reasearch is pointing towards the latter, of using something like Insomnia
to check the routes and etc, so I'm just going to use that 11:30
So, it should be working, just need to test it (probably through Insomnia) 11:30
Testing 11:30 - 12:00
Challenges:
Actually figuring out exactly what I'm doing and what counts as JWT, so just finding out the general program specs was, weird to say the least. the rest of it wasn't too bad just googling how to do things mainly.