1.1.3 • Published 6 years ago

generator-opinionated-express-mvc v1.1.3

Weekly downloads
3
License
MIT
Repository
github
Last release
6 years ago

opinionated-express-mvc NPM version

Scaffolding for building an Express API

Description

Sets up an Express API configured for use with Postgres database through bookshelf and knex. Includes two resources with restful route configuraiton and associations.

This generator assumes user has postgres installed and running on your machine.

Installation

Global Install

To install globally, simply run:

npm install -g yo
npm install -g generator-opinionated-express-mvc

Local Install

If you don't have permissions to install packages globally follow the following steps

$ mkdir <your-app-name>
$ cd <your-app-name>
$ yarn init -y
$ yarn add yo
$ yarn add https://github.com/shanebarringer/generator-opinionated-express-mvc.git

Setup

To generate your new project run:

global
$ yo opinionated-express-mvc
local
$ yarn yo opinionated-express-mvc

note: this generator creates a directory for your project. If you've run the local install option, your project will be nested in a new directory. To fix this issue, mv the entire directory up one level by running $ mv <your-app-name>/* ./ && mv <your-app-name>/.* ./

Once the install/setup is complete, you'll be able to run the server and view the available resources at http://localhost:3001. Once satisfied, run the cleanup script.

$ yarn cleanup

This command will leave the directory structure intact, while removing the existing models, migrations, seeds, routes, etc.

Todo

  • Add test configuration with Mocha and Chai
  • Add additional logic (and prompts) for using alternative relational databases technologies
  • Scaffolding commands
  • Potential support for adding a React view layer

Contributing

  • fork/clone
  • make changes
  • submit a PR npm.io

License

MIT © shane barringer

1.1.3

6 years ago

1.1.2

6 years ago

1.1.1

7 years ago

1.1.0

7 years ago

1.0.4

7 years ago

1.0.3

7 years ago

1.0.2

7 years ago

1.0.1

7 years ago

0.0.1

7 years ago