read .env
This commit is contained in:
parent
d50d40cdeb
commit
33cd46ff91
10
index.js
10
index.js
|
@ -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"
|
||||
});
|
||||
|
||||
|
|
|
@ -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",
|
||||
|
|
Loading…
Reference in New Issue
Block a user