From 5d7957c5fb58368d48c18783ae20a22f44a68cf0 Mon Sep 17 00:00:00 2001 From: tenthirtyone Date: Thu, 3 Aug 2017 03:22:06 -0400 Subject: [PATCH] updated configs and added nginx note in readme --- README.md | 6 +++++- config/config-template.js | 14 +++++++++++++- index.js | 3 ++- 3 files changed, 20 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 60edbbc..719f0e6 100644 --- a/README.md +++ b/README.md @@ -8,4 +8,8 @@ Mongodo running on your system npm install npm start -Logging is current defaulting to debug during dev. Bitcore logging is preceded by a timestamp. Bcoin logging with [info] \ No newline at end of file +Logging is current defaulting to debug during dev. Bitcore logging is preceded by a timestamp. Bcoin logging with [info] + +# Nginx + +The API is configured to run on port 3000 by default. Use the standard Nginx reverse proxy to flip http to https and handle ssl certs. \ No newline at end of file diff --git a/config/config-template.js b/config/config-template.js index 94fac34..6aba02a 100644 --- a/config/config-template.js +++ b/config/config-template.js @@ -1,5 +1,17 @@ const config = { - mongodb: 'mongodb://localhost/bitcore', + bcoin: { + network: 'main', + db: 'leveldb', + checkpoints: true, + workers: true, + logLevel: 'info', + }, + mongodb: { + uri: 'mongodb://localhost/bitcore', + options: { + useMongoClient: true, + }, + }, }; module.exports = config; diff --git a/index.js b/index.js index 005f5be..40c2934 100644 --- a/index.js +++ b/index.js @@ -1,11 +1,12 @@ const node = require('./lib/node'); +const config = require('./config/config.js'); const logger = require('./lib/logger'); const Api = require('./lib/api'); logger.log('debug', 'Debug mode started'); -Api.listen(3000, () => { +Api.listen(config.api.port, () => { logger.log('debug', 'listening on port 3000'); });