add npm run docker-elasticsearch

This commit is contained in:
Zachary Belford 2018-07-06 10:48:24 -07:00
parent 7dcb8808a0
commit 3cecc5372f
No known key found for this signature in database
GPG key ID: BBF4C5121A730B62
2 changed files with 3 additions and 2 deletions

View file

@ -30,7 +30,8 @@
"test": "npm run lint && npm run mocha",
"prod": "npm run build && node dist/",
"mocha": "./node_modules/.bin/mocha --compilers js:babel-register --require babel-polyfill",
"gendoc": "apidoc -i server/ -o docs/"
"gendoc": "apidoc -i server/ -o docs/",
"docker-elasticsearch": "ELASTIC_URL=\"0.0.0.0:9200\" docker run -p 9200:9200 -p 9300:9300 -e \"discovery.type=single-node\" docker.elastic.co/elasticsearch/elasticsearch:5.5.3"
},
"dependencies": {
"@koa/cors": "^2.2.1",

View file

@ -17,7 +17,7 @@ import os from 'os';
const loggerStream = winstonStream(winston, 'info');
const eclient = new elasticsearch.Client({
host: 'http://localhost:9200',
host: process.env.ELASTIC_URL || 'http://localhost:9200',
log: {
level : 'info',