From f4f4545e04d26c3312df2bdc4f0544e45a8f87b0 Mon Sep 17 00:00:00 2001 From: James Allen Date: Fri, 29 Dec 2017 08:11:53 +0000 Subject: [PATCH 1/2] 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", From 7edcfbc29e42520f9ae317269ac21fa67b044520 Mon Sep 17 00:00:00 2001 From: James Allen Date: Fri, 29 Dec 2017 10:36:44 +0000 Subject: [PATCH 2/2] Add coffee script dependency --- services/contacts/package.json | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/services/contacts/package.json b/services/contacts/package.json index e7b26eae51..175b3cc688 100644 --- a/services/contacts/package.json +++ b/services/contacts/package.json @@ -12,15 +12,16 @@ "start": "npm run compile:app && node app.js" }, "dependencies": { - "settings-sharelatex": "git+https://github.com/sharelatex/settings-sharelatex.git#v1.0.0", + "async": "~0.8.0", + "body-parser": "~1.0.2", + "coffee-script": "^1.7.1", + "express": "~4.1.1", "logger-sharelatex": "git+https://github.com/sharelatex/logger-sharelatex.git#v1.1.0", "metrics-sharelatex": "git+https://github.com/sharelatex/metrics-sharelatex.git#v1.7.1", "mongojs": "0.18.2", - "express": "~4.1.1", - "underscore": "~1.6.0", - "body-parser": "~1.0.2", - "async": "~0.8.0", - "request": "~2.34.0" + "request": "~2.34.0", + "settings-sharelatex": "git+https://github.com/sharelatex/settings-sharelatex.git#v1.0.0", + "underscore": "~1.6.0" }, "devDependencies": { "bunyan": "~0.22.3",