           if userConfig.drawRoutes
             _(app.routes).each (route, name) -> app.routes[name] = []
             userConfig.drawRoutes(app)
+            addBodyParserCallbackToRoutes(app.routes)

    return (req, res, next) ->
      proxy.proxyRequest(req, res, {host, port})


  resetRoutesOnServerConfigChange = (app) ->
    watchr grunt.file.expand('config/server.*'), (err, watcher) ->

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

      userConfig.drawRoutes(app) if userConfig.drawRoutes
      addBodyParserCallbackToRoutes(app)

      if apiProxyEnabled
        if pushStateEnabled
          grunt.log.writeln("Proxying API requests prefixed with '#{apiProxyPrefix}' to #{apiProxyHost}:#{apiPort}")
          app.use(prefixMatchingApiProxy(apiProxyPrefix, apiProxyHost, apiPort, new httpProxy.RoutingProxy()))
        else
          grunt.log.writeln("Proxying API requests to #{apiProxyHost}:#{apiPort}")
          app.use(apiProxy(apiProxyHost, apiPort, new httpProxy.RoutingProxy()))

      app.use(express.bodyParser())
      app.use(express.errorHandler())
