Skip to content

Instantly share code, notes, and snippets.

@natmegs natmegs/example.js
Created May 1, 2018

Embed
What would you like to do?
Querying database using Sequelize
const models = require('../models');
models.user.findOne({ where: {id: id} })
.then(user => {
// Do something with User instance
});
models.user.create(data)
.then((newUser) => {
// Do something with User instance
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.