slush-ares
v1.1.7
Published
Slush generator for MEAN stack APIs
Downloads
12
Maintainers
Readme
_______ ______ _______ _______
| _ || _ | | || |
| |_| || | || | ___|| _____|
| || |_||_ | |___ | |_____
| || __ || ___||_____ |
| _ || | | || |___ _____| |
|__| |__||___| |_||_______||_______|
Slush-ares
A Slush generator for APIs
Forked from slush-athena.
To use this generator you must have gulp
and slush
installed:
$ npm install -g gulp slush
Then install the generator:
$ npm install -g slush-ares
With the generator installed make a new project directory:
$ mdkir new_project
$ cd new_project
Scaffold your API:
$ slush ares
This will generate the following files:
.
├── .aresrc
├── .gitignore
├── .jshintrc
├── .travis.yml
├── README.md
├── build-config.js
├── gulpfile.js
├── package.json
├── server
│ ├── api
│ │ └── index.js
│ ├── app.js
│ ├── config
│ │ ├── environment
│ │ │ ├── development.js
│ │ │ ├── index.js
│ │ │ ├── production.js
│ │ │ └── test.js
│ │ ├── express.js
│ │ └── seed
│ │ └── .gitkeep
│ ├── lib
│ │ └── .gitkeep
│ └── routes.js
└── tasks
├── lint.js
└── test.js
$ slush ares:controller
Follow the prompts, and be sure to use a capital case name.
This will generate the following files:
.
├── server
│ ├── api
│ ├── <controller-name>
│ ├── index.js
│ ├── <controller-name>.controller.js
│ └── <controller-name>.controller.spec.js
$ slush ares:model
Follow the prompts, and be sure to use a capital case name.
This will generate the following files:
.
├── server
│ ├── api
│ ├── <model-name>
│ ├── <model-name>.model.js
│ └── <model-name>.model.spec.js
$ slush ares:crud
CRUD stands for Create Read Update Delete.
Follow the prompts to generate CRUD endpoints for your model.
.
├── server
│ ├── api
│ └── <model-name>
│ ├── index.js
│ ├── <model-name>.controller
│ │ ├── createOrder
│ │ │ ├── create<model-name>.spec.js
│ │ │ └── index.js
│ │ ├── delete<model-name>
│ │ │ ├── delete<model-name>.spec.js
│ │ │ └── index.js
│ │ ├── get<model-name>
│ │ │ ├── get<model-name>.spec.js
│ │ │ └── index.js
│ │ ├── index.js
│ │ └── update<model-name>
│ │ ├── index.js
│ │ └── update<model-name>.spec.js
│ ├── <model-name>.model.js
│ └── <model-name>.model.spec.js