Interface: Server
Server-side application configuration.
See Server Config for usage details.
Properties
envValidationSchema?
Zod schema used to validate user-defined server environment variables on
startup. Wasp merges it with built-in validation for Wasp-defined env vars
when validating process.env. Import the schema from app code with a
reference import or pass an ExtImport object.
See Env Vars.
middlewareConfigFn?
optionalmiddlewareConfigFn?:Reference<AnyFunction>
Function that customizes the global Express middleware stack. Affects all operations and APIs.
setupFn?
optionalsetupFn?:Reference<AnyFunction>
Async function called once on server start. Wasp awaits it before the
server accepts requests. Receives a context containing the Express app
and underlying http.Server, so you can register custom routes, set up
additional databases or WebSockets, or kick off scheduled jobs.