interview:developer:nodejs:start

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
interview:developer:nodejs:start [2022/04/06 14:48] joe.maointerview:developer:nodejs:start [2025/03/25 14:25] (current) joe.mao
Line 1: Line 1:
 ====== Node.js Developer Interview ====== ====== Node.js Developer Interview ======
  
- +要求: 
-用 Node.js 加ExpressKoa完成此题目。 +  于''一小时内''完成 
- +  * 在Node.js环境下使用express.js者koa.js完成即可 
-^ 时限 | 1小时 | +  只要''完成后台部分''的代码即可 
-^ 提交方法 | 只要完成后台部分的代码即可。只需要把相关的.js文件以及package.json文件用ZIP(不可用RAR)压缩后电邮代码至 joe.mao@gz.questwork.com。不要把其他脚手架文件如node_modules压缩在內。 | +  * 代码可以''成功运行'' 
- +  * 把相关的**.js**文件以及**package.json**文件用**ZIP**(不可用RAR)压缩后作为提交答案 
-<note warning>电邮內必须寫下你的名字和微信号,否则不予处理。</note> +  * 不要把其他脚手架文件如node_modules压缩在內
  
 ===== 目标 ===== ===== 目标 =====
  
   * 提供后台REST API给前端购物车使用   * 提供后台REST API给前端购物车使用
 +  * response格式为JSON
  
 ===== REST API ===== ===== REST API =====
  
 ^ Method ^ Endpoint ^ Resources ^ ^ Method ^ Endpoint ^ Resources ^
-| GET | http://localhost:8080/all | 所有6个项目 | +| GET | http://localhost:8080/all | 获取所有项目 | 
-| GET | http://localhost:8080/all/第2个项目 | +| GET | http://localhost:8080/all/:id 获取对应id的项目 | 
-| GET | http://localhost:8080/food | 头3个项目 | +| GET | http://localhost:8080/:category/:id | 获取对应分类并且对应id的项目 | 
-| GET | http://localhost:8080/drink/第4个项目 |+| GET | http://localhost:8080/food | 获取所有分类为food的项目 | 
 +| GET | http://localhost:8080/drink/:id 获取所有分类为drink并且对应id的项目 | 
  
-===== 购物车外观 =====+===== 购物车外观(仅参考) =====
  
 {{:interview:developer:vue_developer:screenshot_2019-09-08_at_6.15.55_pm.png?800|}} {{:interview:developer:vue_developer:screenshot_2019-09-08_at_6.15.55_pm.png?800|}}
Line 38: Line 40:
 { id: 5, name: "Orange Juice", category: "Drink", qty: 1, price: 15 }, { id: 5, name: "Orange Juice", category: "Drink", qty: 1, price: 15 },
 { id: 6, name: "Potato Chips", category: "Snack", qty: 1, price: 8 }, { id: 6, name: "Potato Chips", category: "Snack", qty: 1, price: 8 },
 +{ id: 7, name: "tomato", category: "Vegetable", qty: 1, price: 2 },
 ] ]
 </code> </code>
Line 43: Line 46:
 ===== 评分准则 ===== ===== 评分准则 =====
  
-  * MVC设计 
   * 编码整洁   * 编码整洁
 +  * 准时完成
 +  * 使用ES6
 +  * 运行结果达到题目要求
  
  
  • interview/developer/nodejs/start.1649227736.txt.gz
  • Last modified: 2022/04/06 14:48
  • by joe.mao