- Source:
Methods
(static) serve(tree, options) → {Promise.<object>}
- Source:
Start a server for the given project (sub-)tree.
Parameters:
Name | Type | Description | ||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
tree |
object | A (sub-)tree | ||||||||||||||||||||||||||||||||||||||||||||||||||
options |
object | Options
Properties
|
Returns:
Promise resolving once the server is listening.
It resolves with an object containing the
port
,
h2
-flag and a close
function,
which can be used to stop the server.
- Type
- Promise.<object>