summaryrefslogtreecommitdiff
path: root/server
diff options
context:
space:
mode:
Diffstat (limited to 'server')
-rw-r--r--server/db.js17
1 files changed, 7 insertions, 10 deletions
diff --git a/server/db.js b/server/db.js
index d921243..abb61e7 100644
--- a/server/db.js
+++ b/server/db.js
@@ -1,17 +1,14 @@
var Sequelize = require("sequelize"),
- config = require("../config.json"),
- pg = require('pg');
+ config = require("../config.json");
var db = module.exports = {}
-var DATABASE_URL = process.env.DATABASE_URL || ('postgres://postgres:postgres@localhost:5432/' + config.name)
+// var DATABASE_URL = process.env.DATABASE_URL || ('postgres://postgres:postgres@localhost:5432/' + config.name)
-var match = DATABASE_URL.match(/postgres:\/\/([^:]+):([^@]+)@([^:]+):(\d+)\/(.+)/)
+// var match = DATABASE_URL.match(/postgres:\/\/([^:]+):([^@]+)@([^:]+):(\d+)\/(.+)/)
-db.sequelize = new Sequelize(match[5], match[1], match[2], {
- dialect: 'postgres',
- protocol: 'postgres',
- port: match[4],
- host: match[3],
- logging: true //false
+db.sequelize = new Sequelize('mainDB', null, null, {
+ dialect: 'sqlite',
+ logging: false,
+ storage: 'protocols.sqlite',
})