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',
title: 'ToDo App',
wasp: { version: '^0.24.0' },
parts: [],
})
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.
parts
parts:
Part[]
All the Parts of the app.
Build entries with the dedicated constructors (page, route, query, action, api, apiNamespace, job, crud).
server?
optionalserver?:Server
Configuration for the server part of the resulting Wasp app.
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.