Skip to main content

IHttpServer

Implement this interface to create custom HTTP server adapter for AdminForth.

Extended by

Methods

endpoint()

Call Signature

endpoint(options): void

Method which should register endpoint in HTTP server.

Parameters
ParameterTypeDescription
optionsIAdminForthAuthenticatedEndpointOptions: Object with method, path and handler properties.
Returns

void

Call Signature

endpoint(options): void

Parameters
ParameterType
optionsIAdminForthNoAuthEndpointOptions
Returns

void


setupSpaServer()

setupSpaServer(): void

Sets up HTTP server to serve AdminForth SPA. if hotReload is true, it should proxy all requests and headers to Vite dev server at http://localhost:5173$\{req.url\} otherwise it should serve AdminForth SPA from dist folder. See Express for example.

Returns

void