npm

Ready to take your JavaScript development to the next level? Meet npm Enterprise - the ultimate in enterprise JavaScript.Learn more »

inra-server-sequelize

1.4.2 • Public • Published

inra-server-sequelize

npm Dependency Status

Note: full documentation with more examples is published on our Wiki. Please, refer to our Wiki for installation details and API references.

Installation

$ npm install --save inra-server-sequelize

API

const database = new Database(config, autoconnect);

.connect()

Tries to establish a connection with the given database's configuration. Disables operatorsAliases for security purposes.

Example:

database.connect()
  .then()
  .catch();

.associate()

Creates relations between each model. This is automatically executed on .connect but might come handy when implementing migrations and seeders.

Example:

database.associate();

.sync(options)

Creates relations between each model and synchronises the database with provided models.

Example:

database.sync()
  .then()
  .catch();

.import(path)

Loads a model and saves it for further usage.

Example:

database.import();

Contributing

Bug reporting

Github Open Issues Github Closed Issues Github Pull Requests

We want contributing to Inra Server to be fun, enjoyable, and educational for anyone, and everyone. Changes and improvements are more than welcome! Feel free to fork and open a pull request. If you have found any issues, please report them here - they are being tracked on GitHub Issues.

Development

We have prepared multiple commands to help you develop inra-server-sequelize on your own. Don't forget to install all Node.js dependencies from npm. You will need a local copy of Node.js installed on your machine.

$ npm install

Usage

$ npm run <command>

List of commands

Command Description
build Builds inra-server-sequelize
watch Re-builds inra-server-sequelize on changes
clean Deletes builds and cache
lint Fixes Lint errors
flow Checks Flow errors
test Checks for style guide errors and runs tests

Keywords

none

install

npm i inra-server-sequelize

Downloadsweekly downloads

0

version

1.4.2

license

MIT

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar
Report a vulnerability