sails yeoman generator
npm install -g yo
(Make sure you have yo installed)npm set registry https://registry.npmjs.org/
(Make sure you npm registry is official)npm install -g generator-sails-diy
(Install the generators)mkdir my-project && cd $_
(Create project directory andcd
into it)yo sails-diy
(Run sails-diy generator)sails lift
(To run project)npm test
(To test)npm run coverage
(To test and make coverage report)
yo sails-diy:controller Test
(Create a controller in your app)yo sails-diy:model Ticket --rest
(Create a model in your app)yo sails-diy:cron cron1 cron2
(Create a cron in your app)yo sails-diy:service ping
(Create a service in your app)yo sails-diy:policy auth
(Create a policy in your app)npm start
(Compose your API and run)npm test
(Run unit test in your project)
- install adapter that version is Assign
- multiply adapter chooser
- use "request-info" package in this project
MIT