docs
This commit is contained in:
@ -5,12 +5,20 @@ const path = require('path')
|
||||
const arrayify = require('array-back')
|
||||
const t = require('typical')
|
||||
const CommandLineTool = require('command-line-tool')
|
||||
const MiddlewareStack = require('./middleware-stack')
|
||||
const DefaultStack = require('./default-stack')
|
||||
const debug = require('./debug')
|
||||
|
||||
/**
|
||||
* @module local-web-server
|
||||
*/
|
||||
|
||||
const tool = new CommandLineTool()
|
||||
|
||||
class LocalWebServer extends MiddlewareStack {
|
||||
/**
|
||||
* @alias module:local-web-server
|
||||
* @extends module:middleware-stack
|
||||
*/
|
||||
class LocalWebServer extends DefaultStack {
|
||||
_init (options) {
|
||||
this.options = this.options || Object.assign(options || {}, collectUserOptions(this.getOptionDefinitions()))
|
||||
}
|
||||
@ -83,7 +91,7 @@ class LocalWebServer extends MiddlewareStack {
|
||||
}
|
||||
|
||||
function onServerUp (port, directory, isHttps) {
|
||||
const ipList = getIPList(isHttps)
|
||||
const ipList = getIPList()
|
||||
.map(iface => `[underline]{${isHttps ? 'https' : 'http'}://${iface.address}:${port}}`)
|
||||
.join(', ')
|
||||
|
||||
@ -94,7 +102,8 @@ function onServerUp (port, directory, isHttps) {
|
||||
))
|
||||
}
|
||||
|
||||
function getIPList (isHttps) {
|
||||
|
||||
function getIPList () {
|
||||
const flatten = require('reduce-flatten')
|
||||
const os = require('os')
|
||||
|
||||
|
Reference in New Issue
Block a user