custom config file path
parent
cb380d5cbc
commit
52cb228a8a
|
@ -40,3 +40,9 @@ Then run the taiga events service
|
|||
```bash
|
||||
coffee index.coffee
|
||||
```
|
||||
|
||||
You can specify you own config path
|
||||
|
||||
```bash
|
||||
coffee index.coffee --config /path/to/config.json
|
||||
```
|
||||
|
|
|
@ -0,0 +1,8 @@
|
|||
path = require('path')
|
||||
|
||||
config = {};
|
||||
|
||||
exports.config = null
|
||||
|
||||
exports.loadConfigFile = (configPath) ->
|
||||
exports.config = require(path.resolve(configPath))
|
|
@ -1,4 +1,10 @@
|
|||
config = require('./config')
|
||||
eventsConfig = require('./events-config')
|
||||
argv = require('minimist')(process.argv.slice(2));
|
||||
|
||||
eventsConfig.loadConfigFile(argv.config || './config')
|
||||
|
||||
config = eventsConfig.config;
|
||||
|
||||
client = require('./client')
|
||||
|
||||
WebSocketServer = require('ws').Server
|
||||
|
|
|
@ -27,6 +27,7 @@
|
|||
"amqplib": "^0.5.1",
|
||||
"base64-url": "^1.2.1",
|
||||
"bluebird": "^2.9.10",
|
||||
"minimist": "^1.2.0",
|
||||
"node-uuid": "^1.4.2",
|
||||
"ws": "^2.0.3"
|
||||
}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
amqp = require('amqplib')
|
||||
Promise = require('bluebird')
|
||||
amqpUrl = require('./config').url
|
||||
amqpUrl = require('./events-config').config.url
|
||||
|
||||
config = {
|
||||
"exchange": {
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
crypto = require('crypto')
|
||||
base64url = require('base64-url')
|
||||
config = require('./config')
|
||||
config = require('./events-config').config
|
||||
|
||||
salt = 'django.core.signing'
|
||||
|
||||
|
|
Loading…
Reference in New Issue