 {webPort, mongo, amqp} = require argv.c
 webPort = argv.p if argv.p?
 
-path = __dirname+'/..'
+projectRoot = require('path').join(__dirname, '/..')
 
 express = require 'express'
 Broker = require 'broker'

app.use express.bodyParser()
app.use express.cookieParser()
app.use express.session {"secret":"foo"}
app.use gzippo.staticGzip "#{path}/website/"
app.use (req, res, next)->
  res.removeHeader("X-Powered-By")
  next()

  else
    # log.info "serving index.html"
    res.header 'Content-type', 'text/html'
    fs.readFile "#{projectRoot}/website_nonstatic/index.html", (err, data) ->
      throw err if err
      res.send data

