   machine = os.hostname()
   environment = app.settings.env
   Logger.info "Express server listening on #{address} in #{environment} mode (#{machine})"
+  console.log app.settings.dataOptions

#   res.render '500.ejs', { status: 500, message: "TBD" }


app.configure 'development', -> 
  app.use express.errorHandler({ dumpExceptions: true, showStack: true })
  console.log 'development configuration'

app.configure 'production', ->
  app.use express.errorHandler()
  console.log 'production configuration'


# Application settings
# TODO: make showDrafs depending on user logged in
app.set "dataOptions", { 
  dataPath: __dirname + "/data"
  createDataFileIfNotFound: false
  showDrafts: false
}


# Routes


app.get '*', siteRoutes.notFound


# Fire it up!
server = http.createServer(app)
port = app.get('port')
