-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathinit.coffee
More file actions
29 lines (27 loc) · 865 Bytes
/
init.coffee
File metadata and controls
29 lines (27 loc) · 865 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#
# FastChat
# 2015
#
# Initialize Helpers
require('./lib/helpers/helpers')()
Server = require './lib/server'
Mongo = require './lib/model/mongo'
log = require './lib/helpers/log'
s = new Server(port: process.env.PORT or 6190)
s.setup().then ->
Mongo()
.then ->
log.debug 'Starting...'
s.start()
.fail (err)->
log.error '************* ERROR STARTING SERVER *************'
log.error err
log.error '************* ERROR STARTING SERVER *************'
log.error 'What most likely happened?'
log.error 'The Server FAILED to get the correct configuration values for Startup!'
log.error ' Are the Config values correct?'
log.error ' Are the Config values valid JSON?'
log.error ' Did you use the Makefile? This is what it\'s there for.'
log.error ' Did you start the process with the correct ENV Variables?'
process.exit(1)
.done()