Created
November 17, 2013 12:21
-
-
Save t3chnoboy/7512718 to your computer and use it in GitHub Desktop.
sails generate controller User --coffee
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # UserController | |
| # | |
| # @module :: Controller | |
| # @description :: A set of functions called `actions`. | |
| # | |
| # Actions contain code telling Sails how to respond to a certain type of request. | |
| # (i.e. do stuff, then send some JSON, show an HTML page, or redirect to another URL) | |
| # | |
| # You can configure the blueprint URLs which trigger these actions (`config/controllers.js`) | |
| # and/or override them with custom routes (`config/routes.js`) | |
| # | |
| # NOTE: The code you write here supports both HTTP and Socket.io automatically. | |
| # | |
| # @docs :: http://sailsjs.org/#!documentation/controllers | |
| module.exports = | |
| # Actions | |
| # | |
| # Code that should be run when Sails receives an HTTP request | |
| # or a properly structured message from Socket.io. | |
| # | |
| # e.g. | |
| # sayHello: (req, res) -> | |
| # res.send 'Hello world!' | |
| # Overrides for the settings in `config/controllers.js` | |
| # (specific to UserController) | |
| _config: {} |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
'sails generate controller User --coffee' output