db.js | |
---|---|
Core DB connection | var Sequelize = require('sequelize');
var path = require('path');
var db = new Sequelize('main', null, null, { |
We use SQLite3 for simplicity's sake | dialect: 'sqlite',
logging: 'binary' === process.env.NODE_ENV ? false : console.log, |
Our DB is a | storage: path.join(__dirname, '..', '..', 'blend-demo.db'),
}); |
Just a comfort wrapper | db.types = Sequelize;
module.exports = db;
|