Simple project to showcase how to use some basic features and define routes. It is hooked to a MongoDb Database to save the users information.
- POST
/register
Request Payload:
{
"username": "john",
"password": "password",
"firstName": "John",
"lastName": "Doe"
}
Response:
{
"message": "Registration successful for user john!"
}
- POST
/login
Request Payload:
{
"username": "john",
"password": "password"
}
Response:
{
"message": "Login Success!"
}
- GET
/users
Response:
[
{
"id": "5e731f41b7523f2b44eec847",
"username": "john",
"firstName": "John",
"lastName": "Doe"
}
]