From af28e0c5d962be3f267134d09862494196d49f06 Mon Sep 17 00:00:00 2001 From: Ceda EI Date: Sat, 27 Jul 2019 20:40:50 +0530 Subject: [PATCH] [Breaking] Change config.js to config.json --- .gitignore | 1 + config.js => sample.config.json | 0 server.js | 2 +- 3 files changed, 2 insertions(+), 1 deletion(-) rename config.js => sample.config.json (100%) diff --git a/.gitignore b/.gitignore index a865156..14d11a5 100644 --- a/.gitignore +++ b/.gitignore @@ -4,3 +4,4 @@ node_modules *.swo data *.DS_Store +config.json diff --git a/config.js b/sample.config.json similarity index 100% rename from config.js rename to sample.config.json diff --git a/server.js b/server.js index 5f598a8..57f7ea0 100644 --- a/server.js +++ b/server.js @@ -12,7 +12,7 @@ var connect_rate_limit = require('connect-ratelimit'); var DocumentHandler = require('./lib/document_handler'); // Load the configuration and set some defaults -var config = JSON.parse(fs.readFileSync('./config.js', 'utf8')); +var config = require('./config.json'); config.port = process.env.PORT || config.port || 7777; config.host = process.env.HOST || config.host || 'localhost';