-
Notifications
You must be signed in to change notification settings - Fork 0
/
note.txt
21 lines (16 loc) · 874 Bytes
/
note.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
npm install --save memcached mongodb mongoose nodemon dotenv
======= get all questions =======
curl http://127.0.0.1:3000/questions
=================================
======= get a question =======
curl http://127.0.0.1:3000/questions/5b6bc4ce15f50b5a5e951d4f
=================================
======= create a question =======
curl -d '{"name":"Jinglong", "year": "2018", "rating": 5}' -H "Content-Type: application/json" http://127.0.0.1:3000/questions
=================================
======= update a question =======
curl --request PUT -d '{"name":"Jinglong", "year": "2018", "rating": 5}' -H "Content-Type: application/json" http://127.0.0.1:3000/questions/5b6bc4ce15f50b5a5e951d4f
=================================
======= delete a question =======
curl --request DELETE http://127.0.0.1:3000/questions/5b6be0d9f9b10969a42aac89
=================================