项目作者: libxee

项目描述 :
Curriculum design: Employment Management System
高级语言: JavaScript
项目地址: git://github.com/libxee/curriculum-design.git
创建时间: 2018-08-18T17:55:18Z
项目社区:https://github.com/libxee/curriculum-design

开源协议:

下载


Curriculum Design

QuickStart

RESTful style URL definition

Using app.resources(‘routerName’, ‘pathMatch’, ‘controller’) to generate CRUD structures (RESTful style URL definition) on a path for convenience.

For example, the codes above produce a bunch of CRUD path structures for Controller app/controller/posts.js

Method Path Route Name Controller.Action
GET /posts posts app.controllers.posts.index
GET /posts/new new_post app.controllers.posts.new
GET /posts/:id post app.controllers.posts.show
GET /posts/:id/edit edit_post app.controllers.posts.edit
POST /posts posts app.controllers.posts.create
PUT /posts/:id post app.controllers.posts.update
DELETE /posts/:id post app.controllers.posts.destroy

The project structure

  1. .
  2. ├── app
  3. ├── controller
  4. ├── middleware
  5. ├── model
  6. ├── public
  7. ├── router.js
  8. └── service
  9. ├── appveyor.yml
  10. ├── config
  11. ├── logs
  12. ├── node_modules
  13. ├── package.json
  14. ├── package-lock.json
  15. ├── README.md
  16. ├── run
  17. └── test

see [egg docs][egg] for more detail.

Development

  1. $ npm i
  2. $ npm run dev
  3. $ open http://localhost:7001/

Deploy

  1. $ npm start
  2. $ npm stop

npm scripts

  • Use npm run lint to check code style.
  • Use npm test to run unit test.
  • Use npm run autod to auto detect dependencies upgrade