diff options
| author | Ran Guin <[email protected]> | 2021-05-11 18:48:51 -0700 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2021-06-04 22:38:18 -0700 |
| commit | 8992522a3c3781b83ad3e61e8118e981a0cbf6e6 (patch) | |
| tree | b2e708171ec1ee89bb17f93dd900237175ce792e | |
| parent | a487c4df120569b5d01bd380f9502aaafb2f87d4 (diff) | |
| download | coinos-server-8992522a3c3781b83ad3e61e8118e981a0cbf6e6.tar.gz coinos-server-8992522a3c3781b83ad3e61e8118e981a0cbf6e6.zip | |
move private keys to concise dedicated private config file
| -rw-r--r-- | .gitignore | 5 | ||||
| -rw-r--r-- | config/samples/index.sample.js | 13 | ||||
| -rw-r--r-- | config/samples/private.json | 33 |
3 files changed, 43 insertions, 8 deletions
@@ -1,9 +1,5 @@ node_modules/ .env -config/config.json -config/index.js -config/lnurl.js -config/clientversion yarn-error.log .pnp* .yarn* @@ -19,3 +15,4 @@ lnurl-server.sqlite3 watcher.log build.json build.sh +config diff --git a/config/samples/index.sample.js b/config/samples/index.sample.js index aeda15c7..07d892b2 100644 --- a/config/samples/index.sample.js +++ b/config/samples/index.sample.js @@ -1,10 +1,12 @@ -const dbOptions = require("./config.json")[process.env.NODE_ENV || "development"]; +const private = require("./private.json") || {} +const debug = require('debug')('test') + let lnurl; try { lnurl = require("./lnurl"); } catch(e) { - l.warn("lnurl config not found"); + debug("lnurl config not found"); } const btcasset = "5ac9f65c0efcc4775e0baec4ec03abdde22473cd3cf33c0419ca290e0751b225"; @@ -20,7 +22,10 @@ module.exports = { "xxxxxx111xxxx1xxx111xxxxxxxxxxxxxxxxx_x-xxx1xxx1xxxxxxxx1xxxxxxxxx1x1xxxxxxxx1xxx1xxxxx", privateKey: "1xxx1x1xxxxx1xxx1x-xx_xxxx1xxxxx1x1xxx1x1x1" }, - dbOptions, + knex: { + client: 'mysql2', + connection: private.connection[process.env.NODE_ENV || "development"] + }, ipstack: "2e1805258268b4992ebac06e20fc1865", // optional, set default currency based on IP jwt: '2ad260b2202ad557b205ba17c7d8d62c69ffc95021b6147597c32eb30e3cf899', port: 3119, @@ -58,7 +63,7 @@ module.exports = { { c1: btcasset, c2: cadasset, - currency: "CAD". + currency: "CAD", amount: 0.001, askMultiplier: 1.01, bidMultiplier: 0.99, diff --git a/config/samples/private.json b/config/samples/private.json new file mode 100644 index 00000000..e56a5906 --- /dev/null +++ b/config/samples/private.json @@ -0,0 +1,33 @@ +{ + "connection": { + "development": { + "user": "tester", + "password": "testpassword", + "database": "coinos", + "host": "localhost" + }, + "test": { + "username": "proxy", + "password": "pwd", + "database": "database_test", + "host": "127.0.0.1" + }, + "production": { + "username": "proxy", + "password": "pwd", + "database": "database_production", + "host": "127.0.0.1" + } + }, + "jwt": "********", + + "BITCOIN_KEY": "*****", + "LIQUID_KEY": "*****", + "VAPID_KEY": "*****" + + "facebook": { + "appToken": "****", + "specialFriend": "****", + }, +} + |
