This a prototype of sails yeoman integration, this repo is mostly copied from generator-webapp, I don't think this is the best solution for Yeoman sails integration but this repo is for expirimenting with and discussing the integration. The best solution would be for yeoman to have a a configurable backend and so you would just be able to specify the server you wanted to use like:
yo webapp --sailsyo angular --sailsyo chromeapp --express
npm install -g generator-sails
Make sure you have
yo installed, if not run
npm install -g yo
mkdir testProject && cd testProject
This will start the sails server and the grunt watch processes, you will need to reload the page because the
open task fires before the server starts. The sails server will restart when files change and the grunt watch process will auto-compile your assets.
console.log 'yay sails' to
app/scripts/hello.coffee and reload your browser (I haven't gotten livereload to work without a browser extension on dynamic pages) and it will have logged
While your grunt server process is running, in another terminal run
sails generate cat and navigate to
http://localhost:1337/cat/create, (you might need to reload the page once the server restart is slow). The server will have restarted with the new models and controllers and return you the JSON for a new cat.