-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.wasp
76 lines (66 loc) · 2.09 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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
app cursorTemplate {
wasp: {
version: "^0.15.0"
},
title: "Wasp Cursor IDE Template",
client: {
rootComponent: import { Main } from "@src/client/Main.tsx",
},
auth: {
userEntity: User,
methods: {
usernameAndPassword: {},
// For more info on using other Auth methods, check out the Wasp Auth docs: https://wasp-lang.dev/docs/auth/overview
// google: {}
// emailAndPassword: {}
},
onAuthFailedRedirectTo: "/login"
},
}
route LandingPageRoute { path: "/", to: LandingPage }
page LandingPage {
component: import { LandingPage } from "@src/client/LandingPage.tsx"
}
//#region Auth
route LoginRoute { path: "/login", to: LoginPage }
page LoginPage {
authRequired: false,
component: import { LoginPage } from "@src/auth/LoginPage.tsx"
}
route SignupRoute { path: "/signup", to: SignupPage }
page SignupPage {
authRequired: false,
component: import { SignupPage } from "@src/auth/SignupPage.tsx"
}
//#endregion
//#region Example Note Feature
route ExampleNotesDashboardRoute { path: "/example-notes", to: ExampleNotesDashboard }
page ExampleNotesDashboard {
component: import { ExampleNotesDashboard } from "@src/exampleNotesFeature/ExampleNotesDashboard.tsx"
}
route ExampleNoteRoute { path: "/example-note/:id", to: ExampleNotePage }
page ExampleNotePage {
authRequired: true,
component: import { ExampleNotePage } from "@src/exampleNotesFeature/ExampleNotePage.tsx"
}
query getExampleNote {
fn: import { getExampleNote } from "@src/exampleNotesFeature/operations.ts",
entities: [ExampleNote]
}
query getExampleNotes {
fn: import { getExampleNotes } from "@src/exampleNotesFeature/operations.ts",
entities: [ExampleNote]
}
action createExampleNote {
fn: import { createExampleNote } from "@src/exampleNotesFeature/operations.ts",
entities: [ExampleNote]
}
action updateExampleNote {
fn: import { updateExampleNote } from "@src/exampleNotesFeature/operations.ts",
entities: [ExampleNote]
}
action deleteExampleNote {
fn: import { deleteExampleNote } from "@src/exampleNotesFeature/operations.ts",
entities: [ExampleNote]
}
//#endregion