 process.title = 'koding-webserver'
-{argv}        = require 'optimist'
+{ argv }      = require 'optimist'
 
 Object.defineProperty global, \
-  'KONFIG', value : require('koding-config-manager').load "main.#{argv.c}"
+  'KONFIG', { value : require('koding-config-manager').load "main.#{argv.c}" }
 
 { webserver, projectRoot, basicAuth } = KONFIG
 

app.get  '/activity/p/?*'                        , (req, res) -> res.redirect 301, '/Activity'
app.get  '/-/healthCheck'                        , require './handlers/healthcheck'
app.get  '/-/versionCheck'                       , require './handlers/versioncheck'
app.get  '/-/version'                            , (req, res) -> res.jsonp version: KONFIG.version
app.get  '/-/jobs'                               , require './handlers/jobs'
app.post '/recaptcha'                            , require './handlers/recaptcha'
app.get  '/-/presence/:service'                  , (req, res) -> res.status(200).end()

app                   = express()
webPort               = argv.p ? webserver.port
{ error_500 }         = require './helpers'
{ generateHumanstxt } = require './humanstxt'

do ->
  cookieParser = require 'cookie-parser'
