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
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.
Prerequisites
What things you need to install the software and how to install them
Give examples
Additional Features
Sample Working
Installing
A step by step series of examples that tell you how to get a development env running
Say what the step will be
Give the example
And repeat
until finished
End with an example of getting some data out of the system or using it for a little demo
Deployment
Add additional notes about how to deploy this on a live system
DATABASE_URL=your_atlas_db_url(keep this empty is ur not provoding any url)
LOCAL_DB_URL=your local mongo url
DEBUG=true // set true to use local db and false to use atlas
PORT=3000
/signup : (method:post) - create your accout
/login : (method:post) - get jwt token and authenticate yourself using the creds (email,password)
/todos : (method:get) - to get all user related tasks
/todos : (method:post) - to create task
/todos?description&status - query this endpoint to get all the property based task of the current logged in user
/todos/id : (method:get) - to get a single task of currently logged in user using _id (mongoose id)
/todos/id : (method:put) - to update the status of the task of currently logged in user using _id (mongoose id)
/todos/id : (method:delete) - to delete a given task of currently logged in user using _id (mongoose id)
/auth : to restrict the user from accessing the resources on route /todos
Note:
Make sure you have internet connection to connect with the auth backend
while signup send object in this format
{
"email":"[email protected]", // unique email
"password":"R#1aasdf", // atleast one cap, one lower, sepcail symbol and total length should be 8 digits
"confirmPassword":"R#1aasdf",
"firstName":"altaf",
"lastName":"shaikh",
"username":"altafshaikh123" // unique username
}
login object and send the jwt auth token into the authorization header