Skip to content

Classes

VltServer

Defined in: index.ts:64

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:80

Parameters
options

VltServerOptions

Returns

VltServer

Overrides
EventEmitter<{
needConfigUpdate: [string]
}>.constructor

Properties

appData?
optional appData: AppDataManager;

Defined in: index.ts:70

assetsDir?
optional assetsDir: string;

Defined in: index.ts:77

dashboard?
optional dashboard: Dashboard;

Defined in: index.ts:69

dashboardRoot
dashboardRoot: string[];

Defined in: index.ts:76

hasDashboard
hasDashboard: boolean = false

Defined in: index.ts:71

options
options: VltServerOptions

Defined in: index.ts:72

port?
optional port: number;

Defined in: index.ts:73

publicDir?
optional publicDir: string;

Defined in: index.ts:75

securityArchive
securityArchive:
| undefined
| SecurityArchive;

Defined in: index.ts:78

server
server: Server

Defined in: index.ts:74

Methods

address()
address(path): string

Defined in: index.ts:94

Parameters
path

string = '/'

Returns

string

close()
close(): Promise<void>

Defined in: index.ts:174

Returns

Promise<void>

listening()
listening(): this is VltServerListening

Defined in: index.ts:90

Returns

this is VltServerListening

start()
start(__namedParameters): Promise<void>

Defined in: index.ts:105

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

VltServerStartOptions = {}

Returns

Promise<void>

update()
update(this): Promise<void>

Defined in: index.ts:156

Parameters
this

VltServerListening

Returns

Promise<void>

updateGraph()
updateGraph(this): Promise<void>

Defined in: index.ts:144

Parameters
this

VltServerListening

Returns

Promise<void>

updateOptions()
updateOptions(options): void

Defined in: index.ts:152

Parameters
options

VltServerOptions

Returns

void

Type Aliases

VltServerListening

type VltServerListening = VltServer & object

Defined in: index.ts:49

Type declaration

assetsDir
assetsDir: string
port
port: number
publicDir
publicDir: string

VltServerNotListening

type VltServerNotListening = VltServer & object

Defined in: index.ts:55

Type declaration

port
port: undefined
publicDir
publicDir: undefined

VltServerOptions

type VltServerOptions = InstallOptions &
UninstallOptions &
ActualLoadOptions &
object

Defined in: index.ts:32

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:45

Type declaration

port?
optional port: number;

Functions

createServer()

function createServer(options): VltServer

Defined in: index.ts:29

Parameters

options

VltServerOptions

Returns

VltServer