Yeoman generator for Express + Sequelize
JavaScript CSS
Switch branches/tags
Nothing to show
Pull request Compare This branch is 4 commits ahead, 10 commits behind rayokota:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
app
entity
test
.editorconfig
.gitattributes
.gitignore
.jshintrc
.travis.yml
LICENSE
README.md
package.json

README.md

The Express-Sequelize generator

This project is a fork from generator-angular-express-sequelize.

A Yeoman generator for Express with Sequelize.

Express is a Javascript-based micro-framework.

Installation

Install Git and node.js. The development mode also requires SQLite.

Install Yeoman:

npm install -g yo

Install the Express-Sequelize generator:

npm install -g generator-express-sequelize

Creating an Express service

In a new directory, generate the service:

yo express-sequelize

Run the service:

node app.js

Your service will run at http://localhost:3000.

Creating a persistent entity

Generate the entity:

yo express-sequelize:entity [myentity]

You will be asked to specify attributes for the entity, where each attribute has the following:

  • a name
  • a type (String, Integer, Float, Boolean, Date, Enum)
  • for a String attribute, an optional minimum and maximum length
  • for a numeric attribute, an optional minimum and maximum value
  • for a Date attribute, an optional constraint to either past values or future values
  • for an Enum attribute, a list of enumerated values
  • whether the attribute is required

Files that are regenerated will appear as conflicts. Allow the generator to overwrite these files as long as no custom changes have been made.

Run the service:

node app.js