From 0567664c77af91c0c9862212801d3ef71611156c Mon Sep 17 00:00:00 2001 From: James Allen Date: Fri, 29 Dec 2017 08:05:03 +0000 Subject: [PATCH] Provide host as settings and add npm run start script --- services/chat/config/settings.defaults.coffee | 8 ++++---- services/chat/package.json | 4 ++++ 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/services/chat/config/settings.defaults.coffee b/services/chat/config/settings.defaults.coffee index bd35a94ef6..d0f64a9d4f 100644 --- a/services/chat/config/settings.defaults.coffee +++ b/services/chat/config/settings.defaults.coffee @@ -1,20 +1,20 @@ module.exports = internal: chat: - host: "localhost" + host: process.env['LISTEN_ADDRESS'] or "localhost" port: 3010 apis: web: - url: "http://localhost:3000" + url: "http://#{process.env['WEB_HOST'] || "localhost"}:3000" user: "sharelatex" pass: "password" mongo: - url : 'mongodb://127.0.0.1/sharelatex' + url : "mongodb://#{process.env['MONGO_HOST'] || "localhost"}/sharelatex" redis: web: - host: "localhost" + host: process.env['REDIS_HOST'] || "localhost" port: "6379" password: "" \ No newline at end of file diff --git a/services/chat/package.json b/services/chat/package.json index dcdaa1f47b..16ea704bee 100644 --- a/services/chat/package.json +++ b/services/chat/package.json @@ -6,6 +6,10 @@ "type": "git", "url": "https://github.com/sharelatex/chat-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": { "async": "0.2.9", "coffee-script": "~1.7.1",