@vltpkg/server
Classes
VltServer
Defined in: index.ts:63
This class handles the starting and stopping of the server, but the actual response handling is all done in the handleRequest function.
Extends
EventEmitter
<{needConfigUpdate
: [string
]; }>
Constructors
new VltServer()
new VltServer(options): VltServer
Defined in: index.ts:78
Parameters
options
Returns
Overrides
EventEmitter<{ needConfigUpdate: [string]}>.constructor
Properties
assetsDir?
optional assetsDir: string;
Defined in: index.ts:75
dashboard?
optional dashboard: Dashboard;
Defined in: index.ts:68
dashboardRoot
dashboardRoot: string[];
Defined in: index.ts:74
hasDashboard
hasDashboard: boolean = false
Defined in: index.ts:69
options
options: VltServerOptions
Defined in: index.ts:70
port?
optional port: number;
Defined in: index.ts:71
publicDir?
optional publicDir: string;
Defined in: index.ts:73
securityArchive
securityArchive: | undefined | SecurityArchive;
Defined in: index.ts:76
server
server: Server
Defined in: index.ts:72
Methods
address()
address(path): string
Defined in: index.ts:92
Parameters
path
string
= '/'
Returns
string
close()
close(): Promise<void>
Defined in: index.ts:166
Returns
Promise
<void
>
listening()
listening(): this is VltServerListening
Defined in: index.ts:88
Returns
this is VltServerListening
start()
start(__namedParameters): Promise<void>
Defined in: index.ts:103
If no port is specified, then it’ll start counting up from 8000 until it finds one that does not fail with EADDRINUSE.
Parameters
__namedParameters
Returns
Promise
<void
>
update()
update(this): Promise<void>
Defined in: index.ts:154
Parameters
this
Returns
Promise
<void
>
updateGraph()
updateGraph(this): Promise<void>
Defined in: index.ts:142
Parameters
this
Returns
Promise
<void
>
updateOptions()
updateOptions(options): void
Defined in: index.ts:150
Parameters
options
Returns
void
Type Aliases
VltServerListening
type VltServerListening = VltServer & object
Defined in: index.ts:48
Type declaration
assetsDir
assetsDir: string
port
port: number
publicDir
publicDir: string
VltServerNotListening
type VltServerNotListening = VltServer & object
Defined in: index.ts:54
Type declaration
port
port: undefined
publicDir
publicDir: undefined
VltServerOptions
type VltServerOptions = InstallOptions & UninstallOptions & ActualLoadOptions & object
Defined in: index.ts:31
Type declaration
assetsDir?
optional assetsDir: string;
dashboard-root?
optional dashboard-root: string[];
packageJson
packageJson: PackageJson
publicDir?
optional publicDir: string;
VltServerStartOptions
type VltServerStartOptions = object
Defined in: index.ts:44
Type declaration
port?
optional port: number;
Functions
createServer()
function createServer(options): VltServer
Defined in: index.ts:28