Skip to content

A back-end project that serves apis for your to-do apps. Stack: MongoDB + Node.js + Express.js

Notifications You must be signed in to change notification settings

shubhamgupta2901/todo-backend-nodejs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

64 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

A back-end project that serves apis for your to-do apps. Stack: MongoDB + Node.js + Express.js

Documentation

  • Check the Postman api documentation here.

How to use

  • You can use this to create your frontend todo applications.
  • Users can signup, create tasks, update them and close them once finished. They can also maintain their profiles (including avatars).
  • Authentication using JWT, so users can login from multiple devices and at any time signout from one or all devices.
  • Note: On creating a user(signup) or login, you will recieve a json-web-token. All the other api-end points are subject to authorization. Add following key-value pair in your request header to make them work:
key: Authorization 
value: Bearer <YOUR_AUTH_TOKEN>

How it works

How to run server on local

  • Install MongoDB
  • Install Node.js
  • Clone this repository, create a directory config at root directory. Inside config, create a dev.env file with following contents:
PORT=<PORT> 
MONGODB_URL= <YOUR_MONGODB_URL>/<YOUR_DB_NAME>
JWT_SECRET=<YOUR_AUTH_SECRET> 
  • These keys are:
    • PORT: Port on which you want the local server to run. (Generally 3000)
    • MONGODB_URL: By default mongodb runs at localhost: mongodb://127.0.0.1:27017/
    • JWT_SECRET: The secret string you want to use to generate json-web-tokens. Read more here.
  • Run npm install to install dependencies and devDependencies.
  • Run npm run dev.

About

A back-end project that serves apis for your to-do apps. Stack: MongoDB + Node.js + Express.js

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published