Database Support

You can use any database you choose however we provide support for SQL or MongoDB databases.

Setup Your Database

Setup a SQL Database with Sequelize

$ node-rails setup-data-base sql

Setup a MongoDB Database with Mongoose

$ node-rails setup-data-base mongodb

What Was Generated

SQL Database: Sequelize

For given support we provide Sequelize scaffolded with the sequelize cli. You can use any popular SQL database with Sequelize. Sequelize is one of the most popular ORMs for SQL in JavaScript. The documentation for Sequelize and it's CLI can be found on above. We also take advantage of the the Command Line Interface for Sequelize with the Sequelize CLI. The CLI makes generating models, seeders, or migrations easy with tools to run them on your terminal.

$ npm install -g sequelize-cli

MongoDB Database: Mongoose

For given support we provide Mongoose scaffolded with the mongoose model cli. You can use a MOngoDB database with Mongoose. Mongoose is one of the most popular ORMs for MongoDB in JavaScript. The documentation for Mongoose can be found on above. We also take advantage of the the Command Line Interface for Mongoose with the Mongoose Model CLI. The CLI makes generating models, seeders, or migrations easy with tools to run them on your terminal.

$ npm install -g mongoose-model-cli

Custom Databases

You can use any database you choose. They do not have to be any of the databases we support. We highly suggest that you should the controllers and routes provided. They will give you automatic API documentation and Automatic Unit Testing if you do. These features are not attached the database support we provide. You can use any database you'd like to use to get these features running.

Alias Shortcuts

Setup Database Shorthand

$ node-rails sdb sql$ node-rails sdb mongodb