wasp/examples/websockets-realtime-voting/main.wasp
2024-10-04 13:53:34 +02:00

36 lines
794 B
JavaScript

app whereDoWeEat {
wasp: {
version: "^0.15.0"
},
title: "where-do-we-eat",
client: {
rootComponent: import { Layout } from "@src/Layout.jsx",
},
auth: {
userEntity: User,
onAuthFailedRedirectTo: "/login",
methods: {
usernameAndPassword: {}
}
},
webSocket: {
fn: import { webSocketFn } from "@src/ws-server.js",
}
}
route RootRoute { path: "/", to: MainPage }
page MainPage {
component: import Main from "@src/pages/MainPage.tsx",
authRequired: true
}
route LoginRoute { path: "/login", to: LoginPage }
page LoginPage {
component: import { LoginPage } from "@src/pages/LoginPage.jsx"
}
route RegisterRoute { path: "/signup", to: RegisterPage }
page RegisterPage {
component: import { SignupPage } from "@src/pages/SignupPage.jsx"
}