Skip to content
Sushant edited this page Jun 29, 2016 · 6 revisions

Background

We assume you already have node and npm installed into your system. Not sure about that, you can run these commands in terminal

node -v
# outputs like v6.2.0 , otherwise it will be an error

npm -v
# outputs like 3.8.9 , otherwise it will be an error

If not installed, you can get them from following sources

  • Install single node version via Nodejs.org
  • (Or my favorite) Use nvm and use multiple node and npm versions at once.

Installation

Next step is easy one, just goto your project directory via terminal and run following command

npm install --save sequelize

# this install sequelize to your project and save it in your package.json as well

Now you will have to install a database package. Here is the list of all database and their package you will need

Dialect Package
MySQL mysql
Postgres pg
SQLite sqlite3
MSSQL tedious

Say you want to use sequelize with a Postgres database you will have to install pg package.

npm install --save pg

You can connect to multiple databases, you just have to install the correct package as well :)

Home

Getting Started

  • Installation
  • Basic Setup
  • With Express.JS
  • Sequelize CLI
  • Relationships
    • 1 : 1
    • 1 : n
    • n : m
    • Polymorph
  • Hooks
  • Pooling
  • Debugging
  • Migrations

How To

Resources

Upgrade Guides

Help

Clone this wiki locally