@vltpkg/server
Classes
VltServer
Defined in: index.ts:70
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:87
Parameters
options
Returns
Overrides
EventEmitter<{ needConfigUpdate: [string]}>.constructor
Properties
appData?
optional appData: AppDataManager;
Defined in: index.ts:76
assetsDir?
optional assetsDir: string;
Defined in: index.ts:84
config?
optional config: ConfigManager;
Defined in: index.ts:77
dashboard?
optional dashboard: Dashboard;
Defined in: index.ts:75
dashboardRoot
dashboardRoot: string[];
Defined in: index.ts:83
hasDashboard
hasDashboard: boolean = false
Defined in: index.ts:78
options
options: VltServerOptions
Defined in: index.ts:79
port?
optional port: number;
Defined in: index.ts:80
publicDir?
optional publicDir: string;
Defined in: index.ts:82
securityArchive
securityArchive: | undefined | SecurityArchive;
Defined in: index.ts:85
server
server: Server
Defined in: index.ts:81
Methods
address()
address(path): string
Defined in: index.ts:101
Parameters
path
string
= '/'
Returns
string
close()
close(): Promise<void>
Defined in: index.ts:185
Returns
Promise
<void
>
listening()
listening(): this is VltServerListening
Defined in: index.ts:97
Returns
this is VltServerListening
start()
start(__namedParameters): Promise<void>
Defined in: index.ts:112
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:163
Parameters
this
Returns
Promise
<void
>
updateGraph()
updateGraph(this): Promise<void>
Defined in: index.ts:151
Parameters
this
Returns
Promise
<void
>
updateOptions()
updateOptions(options): void
Defined in: index.ts:159
Parameters
options
Returns
void
Type Aliases
VltServerListening
type VltServerListening = VltServer & object
Defined in: index.ts:54
Type declaration
assetsDir
assetsDir: string
config
config: ConfigManager
port
port: number
publicDir
publicDir: string
VltServerNotListening
type VltServerNotListening = VltServer & object
Defined in: index.ts:61
Type declaration
port
port: undefined
publicDir
publicDir: undefined
VltServerOptions
type VltServerOptions = InstallOptions & UninstallOptions & ActualLoadOptions & object
Defined in: index.ts:36
Type declaration
assetsDir?
optional assetsDir: string;
dashboard-root?
optional dashboard-root: string[];
loadedConfig?
optional loadedConfig: LoadedConfig;
packageJson
packageJson: PackageJson
publicDir?
optional publicDir: string;
VltServerStartOptions
type VltServerStartOptions = object
Defined in: index.ts:50
Type declaration
port?
optional port: number;
Functions
createServer()
function createServer(options): VltServer
Defined in: index.ts:33