-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.wasp
56 lines (48 loc) · 1.51 KB
/
main.wasp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
app renderGhcr {
wasp: {
version: "^0.14.0"
},
title: "Using Render.com is cool",
auth: {
userEntity: User,
methods: {
usernameAndPassword: {}, // This is a very naive implementation, use 'email' in production instead
//google: {}, // https://wasp-lang.dev/docs/integrations/google
//gitHub: {}, // https://wasp-lang.dev/docs/integrations/github
//email: {} // https://wasp-lang.dev/docs/guides/email-auth
},
onAuthFailedRedirectTo: "/login",
}
}
route RootRoute { path: "/", to: MainPage }
page MainPage {
authRequired: true,
component: import { MainPage } from "@src/MainPage"
}
route LoginRoute { path: "/login", to: LoginPage }
page LoginPage {
component: import { LoginPage } from "@src/auth/LoginPage"
}
route SignupRoute { path: "/signup", to: SignupPage }
page SignupPage {
component: import { SignupPage } from "@src/auth/SignupPage"
}
query getTasks {
// We specify the JS implementation of our query (which is an async JS function)
fn: import { getTasks } from "@src/tasks/queries",
// We tell Wasp that this query is doing something with the `Task` entity. With that, Wasp will
// automatically refresh the results of this query when tasks change.
entities: [Task]
}
action createTask {
fn: import { createTask } from "@src/tasks/actions",
entities: [Task]
}
action updateTask {
fn: import { updateTask } from "@src/tasks/actions",
entities: [Task]
}
action deleteTasks {
fn: import { deleteTasks } from "@src/tasks/actions",
entities: [Task],
}