diff --git a/.gitignore b/.gitignore index a5bcd88..70cf9ed 100644 --- a/.gitignore +++ b/.gitignore @@ -37,4 +37,4 @@ Temporary Items .apdisk # Config -conf.js \ No newline at end of file +config.js \ No newline at end of file diff --git a/conf.js b/config.js.example similarity index 88% rename from conf.js rename to config.js.example index 4da8f5b..8892d2a 100644 --- a/conf.js +++ b/config.js.example @@ -9,4 +9,4 @@ const config = { }, }; -module.exports = config; +module.exports = config; \ No newline at end of file diff --git a/modules/db.js b/modules/db.js index b08ab1d..a5e9483 100644 --- a/modules/db.js +++ b/modules/db.js @@ -1,5 +1,10 @@ var mysql = require('mysql2'); -const config = require('../conf'); + +try { + const config = require('../config'); +} catch (e) { + console.log('No config file found'); +} function connect() { const connection = mysql.createConnection(config.db);