Switch branches/tags
Nothing to show
Find file History
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
..
Failed to load latest commit information.
config
migrations
models
package.json
readme.md
repl.js

readme.md

01 repl

To try sequelize api in node repl

Env

  • Node 5.3.0

Getting started

$ npm install

# into repl
$ node
// in node repl

const models = require('./repl');
const User = models.User;

// create user
User.create({
    firstName: 'Yamada', 
    lastName: 'Tarou'
}).then((user) => console.log(JSON.stringify(user)));

// find users
User.findAll().then((users) => console.log(JSON.stringify(users)));