From 4ab7f7212de4431385b0fbae27c541eab6d3f34c Mon Sep 17 00:00:00 2001 From: James Allen Date: Fri, 29 Dec 2017 08:16:04 +0000 Subject: [PATCH] Provide hosts as environment settings and add npm run start script --- services/spelling/config/settings.defaults.coffee | 8 ++++---- services/spelling/package.json | 4 ++++ 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/services/spelling/config/settings.defaults.coffee b/services/spelling/config/settings.defaults.coffee index ab13f5429f..6f587b541f 100644 --- a/services/spelling/config/settings.defaults.coffee +++ b/services/spelling/config/settings.defaults.coffee @@ -4,15 +4,15 @@ module.exports = Settings = internal: spelling: port: 3005 - host: "localhost" + host: process.env["LISTEN_ADDRESS"] or "localhost" redis: - port:6379 - host:"127.0.0.1" + port: 6379 + host: process.env["REDIS_HOST"] or "localhost" password:"" mongo: - url : 'mongodb://127.0.0.1/sharelatex' + url : "mongodb://#{process.env["MONGO_HOST"] or "localhost"}/sharelatex" cacheDir: Path.resolve "cache" diff --git a/services/spelling/package.json b/services/spelling/package.json index b20de9d184..7f12b103a8 100644 --- a/services/spelling/package.json +++ b/services/spelling/package.json @@ -6,6 +6,10 @@ "type": "git", "url": "https://github.com/sharelatex/spelling-sharelatex.git" }, + "scripts": { + "compile:app": "coffee -o app/js -c app/coffee && coffee -c app.coffee", + "start": "npm run compile:app && node app.js" + }, "version": "0.1.4", "dependencies": { "async": "0.1.22",