 # SERVER STARTUP
 # -------------------------------------------------------------------------
 
-http.createServer(app).listen argv.port, argv.host, ->
-  console.log "Pull Request Viewer listening on port http://#{ argv.host }:#{ argv.port }"
-
+http.createServer(app).listen port, ->
+  console.log "Pull Request Viewer listening on http://localhost:#{ argv.port }"
+

app = express()

app.configure ->
  app.set 'port', argv.port
  app.set 'views', "#{ __dirname }/views"
  app.set 'view engine', 'hjs'
  app.use express.favicon()


argv = optimist
  .usage('Usage: $0 settings.json')
  .demand(1)
  .argv

settings = JSON.parse fs.readFileSync argv._[0]

port = process.env.PORT or 8000

requireEnv = (name) ->
  value = process.env[name]
