+ this.serveHost(response, route, argv)
+ },
+
+ /** @func
+ * @summary Serve a route to an authorized http host
+ * @desc services host application to the client, establishing a socket
+ * @arg {http.ServerResponse} response - response object to use
+ * @arg {Object} route - the route that belongs to this host
+ * @arg {string[]} argv - vector of arguments sent to the host
+ */
+ serveHost: function (response, route, argv) {
+ dlog(`Serving host ${route.origin}`)
+ response.writeHead(200, { 'Content-Type': 'text/html' })
+ response.write(`${this.skelPage[0]}` +
+ `\tconst _strapp_port = ${route.port}\n` +
+ `\tconst _strapp_protocol = ` +
+ `'${this.httpsOpts ? 'wss' : 'ws'}'\n` +
+ `${this.hostJS}\n${this.skelPage[1]}`)
+ response.end()