         }
 
     if config.persistent and config.server.run
-      server = startServer config, serverIsLaunched
-    else
-      serverIsLaunched()
+      server = startServer config, launchWatcher
+    else
+      launchWatcher()
 
 isConfigFile = (basename, configPath) ->
   files = Object.keys(require.extensions).map (_) -> configPath + _

    if worker.isWorker
      return callback null, {config, fileList, compilers, linters}

    serverIsLaunched = ->
      # Initialise file watcher.
      initWatcher config, (error, watcher) ->
        return callback error if error?

    params.server.port = options.port if options.port
  params

startServer = (config, callback = ->) ->
  serverOpts = config.server or {}
  port = parseInt config.server.port, 10
  publicPath = config.paths.public
  serverCb = ->
    logger.info if config.server.path
      'custom server started, initializing watcher'
    else
       "application started on http://localhost:#{port}/"
    callback()
  if config.server.path
    logger.info 'starting custom server'
    try
      server = require sysPath.resolve config.server.path
    catch error
      logger.error "couldn't load server #{config.server.path}: #{error}"
    unless server.startServer?
      throw new Error 'Brunch server file needs to have startServer function'
    opts = {port, path: publicPath}
    serverConfig = helpers.extend opts, serverOpts.config or {}
    debug "Invoking custom startServer with: #{JSON.stringify serverConfig}"
    if server.startServer.length is 2
      server.startServer serverConfig, serverCb
    else
      server.startServer port, publicPath, serverCb
  else
    opts = noLog: yes, path: publicPath
    pushserve helpers.extend(opts, serverOpts), serverCb

# Filter paths that exist and watch them with `chokidar` package.
#
