README.md
nodejs-api-002-crud
NodeJs 开发知识系列 使用Restify开发api实现基本CRUD操作
项目说明
setup
进入项目目录,跑 'npm install' 安装restify依赖
run
npm run start
HowTo
curl -X GET http://localhost:8080/products
curl -X POST -H "Content-type: application/json" -d '{"id":5,"name":"Cannon","type":"Camera"}' http://localhost:8080/product
curl -X DELETE http://localhost:8080/product/4
curl -X GET http://localhost:8080/product/5
curl -X PUT -H "Content-type: application/json" -d '{"id":5,"name":"CannonX2","type":"Camera"}' http://localhost:8080/product
curl -X GET http://localhost:8080/product/5