Config port and host to listen on

This commit is contained in:
James Allen 2014-08-15 11:35:22 +01:00
parent d74755e55b
commit 062a6877f6
4 changed files with 39 additions and 16 deletions

View file

@ -2,6 +2,10 @@ module.exports = (grunt) ->
# Project configuration.
grunt.initConfig
execute:
app:
src: "app.js"
coffee:
client:
expand: true,
@ -115,9 +119,13 @@ module.exports = (grunt) ->
grunt.loadNpmTasks 'grunt-concurrent'
grunt.loadNpmTasks 'grunt-mocha-test'
grunt.loadNpmTasks 'grunt-plato'
grunt.loadNpmTasks 'grunt-execute'
grunt.loadNpmTasks 'grunt-bunyan'
grunt.registerTask 'compile', ['clean', 'copy', 'coffee', 'less', 'jade', 'requirejs']
grunt.registerTask 'install', ['compile']
grunt.registerTask 'run', ['compile', 'bunyan', 'execute']
grunt.registerTask 'compileAndCompress', ['compile', 'uglify']
grunt.registerTask 'default', ['compile', 'concurrent']
grunt.registerTask 'test:unit', ['compile', 'mochaTest:unit']

View file

@ -1,5 +1,11 @@
logger = require 'logger-sharelatex'
settings = require 'settings-sharelatex'
Server = require "./app/js/server"
Server.server.listen(3010, "localhost")
logger.log "chat sharelatex listening on port 3010"
port = settings.internal?.chat?.port or 3010
host = settings.internal?.chat?.host or "localhost"
Server.server.listen port, host, (error) ->
throw error if error?
logger.log "chat-sharelatex listening on #{host}:#{port}"

View file

@ -1,9 +1,15 @@
module.exports =
internal:
chat:
host: "localhost"
port: 3010
apis:
web:
url: "http://localhost:3000"
user: "sharelatex"
pass: "password"
mongo:
url : 'mongodb://127.0.0.1/sharelatex'

View file

@ -18,22 +18,25 @@
"timekeeper": "0.0.4"
},
"devDependencies": {
"bunyan": "^1.0.0",
"chai": "",
"grunt": "~0.4.1",
"grunt-bunyan": "^0.5.0",
"grunt-concurrent": "~0.4.2",
"grunt-contrib-clean": "~0.5.0",
"grunt-contrib-coffee": "~0.7.0",
"grunt-contrib-copy": "~0.4.1",
"grunt-contrib-jade": "~0.8.0",
"grunt-contrib-less": "~0.8.2",
"grunt-contrib-requirejs": "~0.4.1",
"grunt-contrib-uglify": "~0.2.7",
"grunt-contrib-watch": "~0.5.3",
"grunt-execute": "^0.2.2",
"grunt-nodemon": "~0.1.2",
"grunt-notify": "~0.2.16",
"grunt-plato": "~0.2.1",
"sandboxed-module": "",
"sinon": "",
"timekeeper": "",
"grunt": "~0.4.1",
"grunt-contrib-requirejs": "~0.4.1",
"grunt-contrib-coffee": "~0.7.0",
"grunt-contrib-watch": "~0.5.3",
"grunt-contrib-copy": "~0.4.1",
"grunt-contrib-less": "~0.8.2",
"grunt-contrib-jade": "~0.8.0",
"grunt-contrib-uglify": "~0.2.7",
"grunt-nodemon": "~0.1.2",
"grunt-contrib-clean": "~0.5.0",
"grunt-concurrent": "~0.4.2",
"grunt-plato": "~0.2.1",
"grunt-notify": "~0.2.16"
"timekeeper": ""
}
}