summaryrefslogtreecommitdiff
path: root/server/db.js
blob: abb61e7578b844360b1ff15cf2e8f3842e55032f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
var Sequelize = require("sequelize"),
  config = require("../config.json");

var db = module.exports = {}

// var DATABASE_URL = process.env.DATABASE_URL || ('postgres://postgres:postgres@localhost:5432/' + config.name)

// var match = DATABASE_URL.match(/postgres:\/\/([^:]+):([^@]+)@([^:]+):(\d+)\/(.+)/)

db.sequelize = new Sequelize('mainDB', null, null, {
  dialect: 'sqlite',
	logging:  false,
	storage: 'protocols.sqlite',
})