npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

inra-server-sequelize

v1.4.2

Published

[![npm](https://img.shields.io/npm/v/inra-server-sequelize.svg?maxAge=2592000)](https://www.npmjs.com/package/inra-server-sequelize) [![Dependency Status](https://david-dm.org/project-inra/inra-server.svg?path=packages/inra-server-sequelize)](https://davi

Downloads

4

Readme

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 |