code: function (ui, done) {
  
          var bs          = ui.bs;
          var port        = ui.options.get("port");
          var listenHost  = ui.options.get("listen");
  
          ui.logger.debug("Using port %s", port);
  
          var server = require("./server")(ui, {
              middleware: {
                  socket: bs.getMiddleware("socket-js"),
                  connector: bs.getSocketConnector(bs.options.get("port"), {
                      path: bs.options.getIn(["socket", "path"]),
                      namespace: ui.config.getIn(["socket", "namespace"])
                  })
              }
          });
  
          require('server-destroy')(server.server);
  
          bs.registerCleanupTask(function () {
              if (server.server) {
                  server.server.destroy();
              }
              if (ui.servers) {
                  Object.keys(ui.servers).forEach(function (key) {
                      if (ui.servers[key].server) {
                          ui.servers[key].server.destroy();
                      }
                  });
              }
          });
  
          done(null, {
              instance: {
                  server: server.server.listen(port, listenHost),
                  app: server.app
              }
          });
  
      }
docs: Simple static file server with some middlewares for custom
  scripts/routes.
  @param ui
  @param done