Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/prestonvanloon/slush-ares

Slush generator for MEAN stack APIs
https://github.com/prestonvanloon/slush-ares

Last synced: 4 days ago
JSON representation

Slush generator for MEAN stack APIs

Awesome Lists containing this project

README

        

```
_______ ______ _______ _______
| _ || _ | | || |
| |_| || | || | ___|| _____|
| || |_||_ | |___ | |_____
| || __ || ___||_____ |
| _ || | | || |___ _____| |
|__| |__||___| |_||_______||_______|

```

Slush-ares
============

[![NPM](https://nodei.co/npm/slush-ares.png?downloads=true&downloadRank=true&stars=true)](https://npmjs.com/package/slush-ares)

[![npm version](https://badge.fury.io/js/slush-ares.svg)](http://badge.fury.io/js/slush-ares)
[![Dependency Status](https://david-dm.org/prestonvanloon/slush-ares.svg)](https://david-dm.org/prestonvanloon/slush-ares)

[![Pull Requests Status](http://issuestats.com/github/prestonvanloon/slush-ares/badge/pr?style=flat)](http://issuestats.com/github/prestonvanloon/slush-ares/badge/pr?style=flat)
[![Issues Status](http://issuestats.com/github/prestonvanloon/slush-ares/badge/issue?style=flat)](http://issuestats.com/github/prestonvanloon/slush-ares/badge/issue?style=flat)

A Slush generator for APIs

Forked from [slush-athena](https://github.com/reaganthomas/slush-athena).

* [Slush-ares](#slush-ares)
* [Installation](#installation)
* [Usage](#usage)
* [Scaffold API](#scaffold)
* [Scaffold Controller](#controller)
* [Scaffold Model](#model)
* [Scaffold CRUD](#crud)

Installation

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
```

Usage


Scaffold API

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
```

Scaffold Controller

```
$ slush ares:controller
```

Follow the prompts, and be sure to use a capital case name.

This will generate the following files:

```
.
├── server
│ ├── api
│ ├──
│ ├── index.js
│ ├── .controller.js
│ └── .controller.spec.js
```

Scaffold Model

```
$ slush ares:model
```

Follow the prompts, and be sure to use a capital case name.

This will generate the following files:

```
.
├── server
│ ├── api
│ ├──
│ ├── .model.js
│ └── .model.spec.js
```

Scaffold CRUD

```
$ slush ares:crud
```

CRUD stands for Create Read Update Delete.

Follow the prompts to generate CRUD endpoints for your model.

```
.
├── server
│ ├── api
│   └──
│   ├── index.js
│   ├── .controller
│   │   ├── createOrder
│   │   │   ├── create.spec.js
│   │   │   └── index.js
│   │   ├── delete
│   │   │   ├── delete.spec.js
│   │   │   └── index.js
│   │   ├── get
│   │   │   ├── get.spec.js
│   │   │   └── index.js
│   │   ├── index.js
│   │   └── update
│   │   ├── index.js
│   │   └── update.spec.js
│   ├── .model.js
│   └── .model.spec.js

```