From f4f4545e04d26c3312df2bdc4f0544e45a8f87b0 Mon Sep 17 00:00:00 2001 From: James Allen Date: Fri, 29 Dec 2017 08:11:53 +0000 Subject: [PATCH] Provide hosts as environment settings and add npm run start script --- services/contacts/config/settings.defaults.coffee | 4 ++-- services/contacts/package.json | 4 ++++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/services/contacts/config/settings.defaults.coffee b/services/contacts/config/settings.defaults.coffee index 484e6c2a33..5315fbffe9 100644 --- a/services/contacts/config/settings.defaults.coffee +++ b/services/contacts/config/settings.defaults.coffee @@ -5,7 +5,7 @@ module.exports = internal: contacts: port: 3036 - host: "localhost" + host: process.env["LISTEN_ADDRESS"] or "localhost" mongo: - url: 'mongodb://127.0.0.1/sharelatex' + url: "mongodb://#{process.env["MONGO_HOST"] or "localhost"}/sharelatex" diff --git a/services/contacts/package.json b/services/contacts/package.json index ccb66da598..e7b26eae51 100644 --- a/services/contacts/package.json +++ b/services/contacts/package.json @@ -7,6 +7,10 @@ "type": "git", "url": "https://github.com/sharelatex/contacts-sharelatex.git" }, + "scripts": { + "compile:app": "coffee -o app/js -c app/coffee && coffee -c app.coffee", + "start": "npm run compile:app && node app.js" + }, "dependencies": { "settings-sharelatex": "git+https://github.com/sharelatex/settings-sharelatex.git#v1.0.0", "logger-sharelatex": "git+https://github.com/sharelatex/logger-sharelatex.git#v1.1.0",