Giter Club home page Giter Club logo

sails-generate-custom-response's Introduction

image_squidhome@2x.png

sails-generate-custom-response

A customizable server response generator for use with the Sails command-line interface.

Installation

Certain generators are installed by default in Sails, but they can be overridden. Check the Sails docs for information on installing generator overrides / custom generators.

Example Usage

To generate a new customizable server response called serverMadBro, do this.

catGuy@catGu:/home/sailsStuff/myApp$ sails generate custom-response serverMadBro 566

This will create the file myApp/api/responses/serverMadBro.js . The response can then be issued from a controller or policy using res.serverMadBro('The Server is so mad bro. Better try again later',566);

Development

To get started quickly and see this generator in action, run the bin/index.js script:

$ git clone YOUR_FORK_OF_THIS_REPO sails-generate-custom-response-fork
$ cd sails-generate-custom-response-fork
$ npm install
$ node ./bin

bin/index.js is a simple script, bundled only for convenience, that runs the generator with hard-coded scope variables. Please feel free to modify that file however you like! Also see CONTRIBUTING.md for more information on overriding/enhancing generators.

Questions?

See FAQ.md.

More Resources

License

MIT © 2014 balderdashy & [contributors] Mike McNeil, Balderdash & contributors

Sails is free and open-source under the MIT License.

sails-generate-custom-response's People

Contributors

uncletammy avatar

Watchers

 avatar

Forkers

rachaelshaw

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.