Skip to content

marten790/user-and-task-manager

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

##NodeJS restful application that stores data to Atlas:MongoDB

###Requirements: NodeJS If you wish to use a diffrent db then please update the db.js file with the details you prefer.

###Clone: git clone https://github.com/marten790/user-and-task-manager.git

Install Dependencies from route:

npm install

Run app:

node app.js

API Calls

Please find API calls below. Postman works to test.

Create user:

http://hostname/api/users
POST {"username":"jsmith","first_name" : "John", "last_name" : "Smith"}

Update user:

http://hostname/api/users/{UserId}
PUT {"first_name" : "John", "last_name" : "Doe"}

List all users

GET http://hostname/api/users

Get User info

GET http://hostname/api/users/{id}

Create Task

http://hostname/api/users/{user_id}/tasks
POST {"name":"My task","description" : "Description of task"}

Update Task

http://hostname/api/users/{user_id}/tasks/{task_id}
PUT '{"name":"My updated task"}'

Delete Task

DELETE http://hostname/api/users/{user_id}/tasks/{task_id}

Get Task Info

GET http://hostname/api/users/{user_id}/tasks/{task_id}

List all tasks for a user

GET http://hostname/api/users/{user_id}/tasks

About

NodeJS restful application that stores data to Atlas:MongoDB

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors