   httpProxy = require("http-proxy")
   fileUtils = require("./../lib/file-utils")
   watchr = require('watch_r-structr-lock')
+  fs = require("fs")
 
   grunt.registerTask "server", "static file & api proxy development server", ->
     apiPort = process.env.API_PORT || grunt.config.get("server.apiProxy.port") || 3000

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

      userConfig.drawRoutes?(app)
      addBodyParserCallbackToRoutes(app)


    server.listen webPort, ->
      resetRoutesOnServerConfigChange(app)

  mountUserStaticRoutes = (app, webRoot, staticRoutes) ->
    _(staticRoutes).each (src, dest) ->
      path = if fs.existsSync(src) then src else "#{process.cwd()}/#{webRoot}/#{src}"
      grunt.log.writeln("Mounting static assets found in `#{path}` to route `#{dest}`")
      app.use(dest, express.static(path))

  pushStateSimulator = (cwd, webRoot) ->
    (req, res, next) ->
