Interface: App
Root shape of a Wasp app specification.
Pass an App to the app constructor and export default the
result from main.wasp.ts.
Exampleโ
import { app } from "@wasp.sh/spec"
export default app({
name: "todoApp",
wasp: { version: "^0.24.0" },
title: "ToDo App",
head: ["<link rel='icon' href='/favicon.ico' />"],
spec: [],
});
Propertiesโ
auth?โ
optionalauth?:Auth
Configuration for authentication. Enables auth when set.
client?โ
optionalclient?:Client
Configuration for the client part of the resulting Wasp app.
db?โ
optionaldb?:Db
Configuration for the app's database.
emailSender?โ
optionalemailSender?:EmailSender
Configuration for the app's email sender.
head?โ
optionalhead?:string[]
Extra tags injected into the HTML <head>.
Each entry is rendered inside a React component, so the strings must be
valid JSX: self-closing tags must end with /> (e.g. <meta ... />),
and attributes must be camelCased (e.g. httpEquiv instead of
http-equiv).
Due to a React bug,
avoid defer on <script> tags because it can cause hydration
warnings. Use async instead.
nameโ
name:
string
Internal app name.
Must not contain spaces.
server?โ
optionalserver?:Server
Configuration for the server part of the resulting Wasp app.
specโ
spec:
Spec
The specification (Spec) of the app.
Build entries with the dedicated constructors (page, route, query, action, api, apiNamespace, job, crud).
titleโ
title:
string
App title.
Used as the browser tab title.
waspโ
wasp:
Wasp
Wasp metadata.
This will get checked against the Wasp CLI.
webSocket?โ
optionalwebSocket?:WebSocket
Configuration for the app's WebSocket support.