Remove Stuff

This commit is contained in:
Daniel Odendahl Jr
2017-06-22 03:17:03 +00:00
parent 046a559342
commit 5e7a8d17ad
38 changed files with 40 additions and 704 deletions
-23
View File
@@ -1,23 +0,0 @@
const Sequelize = require('sequelize');
const { DATABASE_URL } = process.env;
const database = new Sequelize(DATABASE_URL, { logging: false });
class Database {
static get db() {
return database;
}
static start() {
database.authenticate()
.then(() => console.log('[DATABASE] Connection has been established successfully.'))
.then(() => console.log('[DATABASE] Synchronizing...'))
.then(() => database.sync()
.then(() => console.log('[DATABASE] Synchronizing complete!'))
.catch((err) => console.error(`[DATABASE] Error synchronizing: ${err}`))
)
.then(() => console.log('[DATABASE] Ready!'))
.catch((err) => console.error(`[DATABASE] Unable to connect: ${err}`));
}
}
module.exports = Database;