Rename config.js to conf.js

This commit is contained in:
Moe Poi ~ 2021-11-15 17:28:40 +07:00
parent d142e2bc84
commit 3bd74cb6ea
2 changed files with 1 additions and 13 deletions

View file

@ -1,12 +0,0 @@
const env = process.env;
const config = {
db: {
host: env.DB_HOST,
user: env.DB_USER,
password: env.DB_PASSWORD,
database: env.DB_NAME,
},
};
module.exports = config;

View file

@ -1,5 +1,5 @@
var mysql = require('mysql2'); var mysql = require('mysql2');
const config = require('../config'); const config = require('../conf');
function connect() { function connect() {
const connection = mysql.createConnection(config.db); const connection = mysql.createConnection(config.db);