interview:developer:nodejs:start

This is an old revision of the document!


Node.js Developer Interview

请用 Node.js 加Express或Koa完成此题目。

时限 1小时
提交方法 压缩后电邮代码至 hr@sz.questwork.com
  • 提供后台REST API给前端购物车使用
Method Endpoint Resources
GET http://localhost:8080/all 所有6个项目
GET http://localhost:8080/all/2 第2个项目
GET http://localhost:8080/food 头3个项目
GET http://localhost:8080/drink/4 第4个项目

购物车数据。

[
{ id: 1, name: "Chicken Wing", category: "Food", qty: 3, price: 10 },
{ id: 2, name: "Pizza", category: "Food", qty: 1, price: 50 },
{ id: 3, name: "Hamburger", category: "Food", qty: 1, price: 12 },
{ id: 4, name: "Coca Cola", category: "Drink", qty: 2, price: 5 },
{ id: 5, name: "Orange Juice", category: "Drink", qty: 1, price: 15 },
{ id: 6, name: "Potato Chips", category: "Snack", qty: 1, price: 8 },
]
  • MVC设计
  • 编码整洁
  • interview/developer/nodejs/start.1575263791.txt.gz
  • Last modified: 2019/12/02 13:16
  • by don.lee