       logging.info 'Restarting the application server...'
     else
       # Start the server in a child process
-      child = exports.child = spawn 'node', ['server/server.js'], {stdio: 'inherit', cwd: process.cwd()}
+      child = exports.child = spawn 'node', ['server/server.js'], {cwd: process.cwd()}
       child.shouldRestart = false
 
-      # child.stdout.on 'data', (data) ->
-      #   console.log data.toString()
-      #   reloadBrowser() if /Quit the server with CONTROL-C/.test(data.toString())
+      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.stderr.on 'data', (data) ->
+        if data.toString().length > 1
+          logging.error data
 
       child.on 'exit', (code) =>
         exports.child = null

# The Node.js app server
class NodeAppServer

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

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

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

