wasp/examples/websockets-realtime-voting/main.wasp
2024-07-08 18:04:29 +02:00

36 lines
794 B
JavaScript

app whereDoWeEat {
wasp: {
version: "^0.14.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"
}