这是基于NodeJs,MongoDB的博客系统,它负责基础的API服务。如需要与之契合的前端项目请前往前端项目
需要编译环境,具体配置请参阅node-gyp
* 安装依赖
$ npm install
* 安装全局sails
$ sudo npm install sails -g
* 安装全局grunt (sails)
$ sudo npm install grunt -g
运行:
* 挂起服务 默认监听1337端口
$ sails lift
生成文档:
$ npm install apidoc -g
$ npm run api
创建sails:
$ sails generate api <foo>
$ sails generate model <foo> [attribute1:type1, attribute2:type2 ... ]
$ sails generate controller <foo> [action1, action2, ...]
- StackOverflow
- What are the best video tutorials for Node.js or Sails.js? (Quora)
- Up and Running in Node.js (Sails basics are covered towards the end of this video course on Lynda)
blog由WittBulter开发,如果你需要加入开发团队,请联系我:
Witt Bulter |