mirror of
https://github.com/seejohnrun/haste-server
synced 2025-08-14 06:36:50 -07:00
parent
a108dbadc5
commit
f255928af7
2 changed files with 4 additions and 3 deletions
|
@ -11,7 +11,8 @@ 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'));
|
||||
const configPath = process.argv.length <= 2 ? 'config.js' : process.argv[2];
|
||||
const config = JSON.parse(fs.readFileSync(configPath, 'utf8'));
|
||||
config.port = process.env.PORT || config.port || 7777;
|
||||
config.host = process.env.HOST || config.host || 'localhost';
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue