Below this line is an old TodoAppv1 Documentation. This docs has been updated to v2. To open this app simply go to a. Client: https://pawtodoapp.netlify.app/ b. Server: https://pawtodoserver.herokuapp.com/
This is a basic CRUD (Create, Read, Update, Delete) with Node.js for server-side processing, Express.js for routing HTTP request, and MongoDB for database.
- Install MongoDB and MongoDB Compass on your local machine
- Install Postman on your local machine
- Install dependencies with
npm install
- Create folder in C:/ and name it with
data
- Create folder in C:/data and name it with
db
- Start MongoDB server with
mongos
running in background - Open MongoDB Compass and connect to localhost database
http://127.0.0.1:27017
- Create new collection and name it
todoDB
- Move to directory
./todo_crud/TodoApp/
- Run
node server.js
- Test the API with HTTP Request on Postman app
- On the body section you can fill required data with JSON format
Request Header | Description |
---|---|
router.post('/', todo.create) | create a new todo |
router.get('/', todo.findAll) | get all todo in the database |
router.get('/:id', todo.findOne) | get specific todo with specified id |
router.put('/:id', todo.update) | update specific todo with specified id |
router.delete('/:id', todo.delete) | delete specific todo with specified id |
router.patch('/:id', todo.patch) | update one field of todo with specified id |
- Muhammad Firas Zahid Suryaatmaja (19/439816/TK/48546)
- Wahyu Cahyo W (19/444077/TK/49273)
- Vincent Colin (19/44076/48272)
- Marthasya Mumtahanah Mustaqimah (19/444059/TK/49255)