read .env

This commit is contained in:
GottZ 2017-07-31 13:49:52 +02:00
parent d50d40cdeb
commit 33cd46ff91
2 changed files with 7 additions and 4 deletions

View File

@ -6,11 +6,13 @@ Raven.config('https://10749fc75fc14fc5aa6b6212adbfe9ec:c291a65aa6014bb781232e099
const Irc = require("irc");
const Mysql = require("mysql");
require('dotenv').config({path: '/var/www/w0bm.com/.env'});
let db = Mysql.createPool({
host: "localhost",
user: "laravel",
password: "mvYx-.c6{m98rwKE",
database: "laravel",
host: process.env.DB_HOST,
user: process.env.DB_USERNAME,
password: process.env.DB_PASSWORD,
database: process.env.DB_DATABASE,
timezone: "utc"
});

View File

@ -9,6 +9,7 @@
"author": "gz",
"license": "ISC",
"dependencies": {
"dotenv": "^4.0.0",
"google": "^2.1.0",
"irc": "^0.5.2",
"mysql": "^2.13.0",