Back to Pocketbase

Interface ServeEvent

static/jsvm/interfaces/core.ServeEvent.html

latest2.3 KB
Original Source

Interface ServeEvent

Hierarchy

Index

Methods

next

Properties

appcertManager?installerFunclistenerrouter?server?

Methods

next

  • next(): void

Next calls the next hook handler.

Returns void

Properties

app

app: App

Optional certManager

certManager?: any

installerFunc

installerFunc: ((app, systemSuperuser, baseURL) => void)

Type declaration

    • (app, systemSuperuser, baseURL): void

InstallerFunc is the "installer" function that is called after successful server tcp bind but only if there is no explicit superuser record created yet.

It runs in a separate goroutine and its default value is [apis.DefaultInstallerFunc].

It receives a system superuser record as argument that you can use to generate a short-lived auth token (e.g. systemSuperuser.NewStaticAuthToken(30 * time.Minute)) and concatenate it as query param for your installer page (if you are using the client-side SDKs, you can then load the token with pb.authStore.save(token) and perform any Web API request e.g. creating a new superuser).

Set it to nil if you want to skip the installer.

Parameters

- 
app: App
- 
systemSuperuser: core.Record
- 
baseURL: string

Returns void

listener

listener: Listener

Listener allow specifying a custom network listener.

Leave it nil to use the default net.Listen("tcp", e.Server.Addr).

Optional router

router?: Router<RequestEvent>

Optional server

server?: Server

Settings

Member Visibility

  • Inherited

Theme

OSLightDark

On This Page

Generated using TypeDoc