       {ignored: ignored, persistent: true, ignoreInitial: true, usePolling: true, interval: 200}
     watcher.on 'add', (path) =>
       logging.info "added #{path}"
-      @restart()
+      @start()
     watcher.on 'change', (path) =>
       logging.info "changed #{path}"
-      @restart()
+      @start()
     watcher.on 'unlink', (path) =>
       logging.info "removed #{path}"
-      @restart()
+      @start()
     watcher.on 'error', (error) ->
       logging.error "Error occurred while watching files: #{error}"
 

# The Node.js app server
class NodeAppServer

  constructor: ->
    @restart = _.debounce(@start, 1000, true)

  startAndWatch: ->
    # Start the server
    @start()

      logging.info 'Restarting the application server...'
    else
      # Start the server in a child process
      child = exports.child = spawn 'node', ['server/server.js'], {cwd: process.cwd()}
      child.shouldRestart = false

      child.stdout.on 'data', (data) ->
        console.log data.toString()
        if /Quit the server with CONTROL-C/.test(data.toString())
          reloadBrowser()

      child.stderr.on 'data', (data) ->
        if data.toString().length > 1
          logging.error data

      child.on 'exit', (code) =>
        exports.child = null
