- Added the magic mystery key wooo

This commit is contained in:
Alexis
2020-06-15 22:16:53 +02:00
parent b543197021
commit 82bbf9f7bb
14 changed files with 94 additions and 34 deletions

View File

@@ -2,19 +2,15 @@
const fs = require('fs')
const mysql = require('mysql')
// Fetches and parses credentials file
let credentials_data = fs.readFileSync('./database/credentials.json')
let credentials = JSON.parse(credentials_data)
// Setting up the database connection
const knex = require('knex')({
client: credentials.client,
client: "mysql",
connection: {
host : credentials.host,
user : credentials.user,
password : credentials.password,
database : credentials.database,
charset : credentials.charset
host : process.env.DB_HOST,
user : process.env.DB_USER,
password : process.env.DB_PASSWORD,
database : "auracle",
charset : "utf8"
},
})
const bookshelf = require('bookshelf')(knex)