Skip to content

Instantly share code, notes, and snippets.

@mikermcneil
Created August 3, 2012 04:33
Show Gist options
  • Save mikermcneil/3244408 to your computer and use it in GitHub Desktop.
Save mikermcneil/3244408 to your computer and use it in GitHub Desktop.
Sails/Mast Example
git clone [email protected]:balderdashy/sails-example.git sails-example
cd sails-example
npm install sails
npm install rigging
cp config.ex.js config.js
# Modify config.js to map to one of your local mySQL databases with your username and password
node sails.js
# The app is configured to run on port 5008 at the moment, and you can check out:
# http://localhost:5008/experiment
# to see mast in action
# The Socket is enabled (one of the things we didn't talk about)
# Mast overrides Backbone.sync to use Socket.io
# then on the backend, Sails/Rigging modifies the express source code to RESTfully route socket.io/websocket messages just like they were XHR requests.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment