## Modules
dev-toolbox/files

Files module.

dev-toolbox

The dev-toolbox module.

dev-toolbox/server

Server module.

dev-toolbox/server/TempServer

The TempServer module.

## Classes
TempServer
## Functions
path(path)string

Returns a normalized path.

root([path])string

Returns a normalized path relative to the project's root directory.

getHost([host])string

Returns the host.

getPort([port])number

Returns a free port.

getUrl([host], [port])string

Returns the URL. The default URL is "http://127.0.0.1:8080".

startTempServer([...args])Promise.<TempServer>

Starts a temporary server for testing purposes.

## dev-toolbox/files Files module. ## dev-toolbox The dev-toolbox module. ## dev-toolbox/server Server module. ## dev-toolbox/server/TempServer The TempServer module. ## TempServer **Kind**: global class * [TempServer](#TempServer) * [new TempServer(host, port)](#new_TempServer_new) * [.host](#TempServer+host) ⇒ string * [.port](#TempServer+port) ⇒ number * [.start()](#TempServer+start) ⇒ [Promise.<TempServer>](#TempServer) * [.stop()](#TempServer+stop) ⇒ [Promise.<TempServer>](#TempServer) ### new TempServer(host, port) Creates a temporary server for test purposes.
ParamTypeDescription
hoststring

The port of the temporary server.

portnumber

The port of the temporary server.

### tempServer.host ⇒ string Returns the host. **Kind**: instance property of [TempServer](#TempServer) **Returns**: string - The host. ### tempServer.port ⇒ number Returns the port. **Kind**: instance property of [TempServer](#TempServer) **Returns**: number - The port. ### tempServer.start() ⇒ [Promise.<TempServer>](#TempServer) Starts the temporary server. **Kind**: instance method of [TempServer](#TempServer) ### tempServer.stop() ⇒ [Promise.<TempServer>](#TempServer) Stops the temporary server. **Kind**: instance method of [TempServer](#TempServer) ## path(path) ⇒ string Returns a normalized path. **Kind**: global function **Returns**: string - The normalized path.
ParamTypeDescription
pathstring

The path to be normalized.

## root([path]) ⇒ string Returns a normalized path relative to the project's root directory. **Kind**: global function **Returns**: string - The normalized path relative to the project's root directory.
ParamTypeDescription
[path]string

The path to use to normalize. If none given, only the project's root directory will be used.

## getHost([host]) ⇒ string Returns the host. **Kind**: global function **Returns**: string - The host.
ParamTypeDescription
[host]string

The host. The default host is "127.0.0.1".

## getPort([port]) ⇒ number Returns a free port. **Kind**: global function **Returns**: number - The free port.
ParamTypeDescription
[port]number

The port. If no port given, the default port is 8080.

## getUrl([host], [port]) ⇒ string Returns the URL. The default URL is "http://127.0.0.1:8080". **Kind**: global function **Returns**: string - The URL with the given port.
ParamTypeDescription
[host]string

The host. The default host is "127.0.0.1".

[port]number

The port. If no port given, the default port is 8080.

## startTempServer([...args]) ⇒ [Promise.<TempServer>](#TempServer) Starts a temporary server for testing purposes. **Kind**: global function
ParamTypeDescription
[...args]*

If one argument is specified, that will be the (port). If two arguments, they will be the (host, port).