require() "beerchat.js" file in pwd for more flexibility (#56)
* require() "beerchat.js" file in pwd for more flexibility * fix integration test
This commit is contained in:
parent
37844e6cf6
commit
654444d20b
2
.gitignore
vendored
2
.gitignore
vendored
@ -1,3 +1,3 @@
|
||||
node_modules
|
||||
beerchat.json
|
||||
beerchat.js
|
||||
beerchat
|
||||
|
@ -10,7 +10,7 @@ docker network create beerchat
|
||||
#TODO echo ${BEERCHAT_CONFIG} >> beerchat.json
|
||||
|
||||
docker run --name beerchat_proxy --rm \
|
||||
-v $(pwd)/test/beerchat-test.json:/data/beerchat.json \
|
||||
-v $(pwd)/test/beerchat-test.js:/data/beerchat.js \
|
||||
--network beerchat \
|
||||
beerchat_proxy &
|
||||
|
||||
|
@ -19,9 +19,9 @@ curl -X POST \
|
||||
|
||||
## Configuration
|
||||
|
||||
beerchat.json
|
||||
```json
|
||||
{
|
||||
beerchat.js
|
||||
```js
|
||||
module.exports = {
|
||||
"debug": true,
|
||||
|
||||
"remotes": [{
|
||||
@ -45,7 +45,7 @@ beerchat.json
|
||||
"main": "test"
|
||||
}
|
||||
}]
|
||||
}
|
||||
};
|
||||
```
|
||||
|
||||
## Starting
|
||||
|
@ -1,5 +1,4 @@
|
||||
|
||||
const fs = require('fs');
|
||||
const cfg = JSON.parse(fs.readFileSync('beerchat.json', 'utf8'));
|
||||
const cfg = require("../beerchat");
|
||||
|
||||
module.exports = cfg;
|
||||
|
@ -1,4 +1,4 @@
|
||||
{
|
||||
module.exports = {
|
||||
"debug": true,
|
||||
"remotes": []
|
||||
}
|
||||
};
|
Loading…
x
Reference in New Issue
Block a user