       watcher.on 'change', (contexts) ->
         _(contexts).each (context) ->
           userConfig = fileUtils.reloadConfigurationFile("server")
-          if userConfig.drawRoutes
+          if userConfig.drawRoutes?
             _(app.routes).each (route, name) -> app.routes[name] = []
             userConfig.drawRoutes(app)
             addBodyParserCallbackToRoutes(app.routes)


      app.use(express.bodyParser())
      app.use(express.errorHandler())
      userConfig.drawRoutes(app) if userConfig.drawRoutes
      app.use(pushStateSimulator(process.cwd(),webRoot)) if pushStateEnabled

    grunt.log.writeln("Starting express web server in \"./generated\" on port #{webPort}")

    app = express()
    server = http.createServer(app)

    userConfig.modifyHttpServer?(server)

    app.configure ->
      app.use(express.compress())
      app.use(express.static("#{process.cwd()}/#{webRoot}"))

      userConfig.drawRoutes?(app)
      addBodyParserCallbackToRoutes(app)

      if apiProxyEnabled
