mirror of
https://github.com/wasp-lang/wasp.git
synced 2024-12-27 02:52:22 +03:00
75 lines
1.5 KiB
JavaScript
75 lines
1.5 KiB
JavaScript
app crudTesting {
|
|
wasp: {
|
|
version: "^0.15.0"
|
|
},
|
|
head: [
|
|
"<link rel=\"stylesheet\" href=\"https://unpkg.com/mvp.css@1.12/mvp.css\">"
|
|
],
|
|
title: "crud-testing",
|
|
auth: {
|
|
userEntity: User,
|
|
methods: {
|
|
usernameAndPassword: {
|
|
userSignupFields: import { userSignupFields } from "@src/auth.js",
|
|
},
|
|
},
|
|
onAuthFailedRedirectTo: "/login",
|
|
},
|
|
db: {
|
|
seeds: [
|
|
import { migrateAuth } from "@src/seeds/migrateAuth.js"
|
|
]
|
|
}
|
|
}
|
|
|
|
route RootRoute { path: "/", to: MainPage }
|
|
page MainPage {
|
|
component: import Main from "@src/MainPage.tsx",
|
|
authRequired: true,
|
|
}
|
|
|
|
route LoginRoute { path: "/login", to: LoginPage }
|
|
page LoginPage {
|
|
component: import { LoginPage } from "@src/LoginPage.tsx",
|
|
}
|
|
|
|
route SignupRoute { path: "/signup", to: SignupPage }
|
|
page SignupPage {
|
|
component: import { SignupPage } from "@src/SignupPage.tsx",
|
|
}
|
|
|
|
route DetailRoute { path: "/:id/:something?", to: DetailPage }
|
|
page DetailPage {
|
|
component: import Main from "@src/DetailPage.tsx",
|
|
authRequired: true,
|
|
}
|
|
|
|
crud tasks {
|
|
entity: Task,
|
|
operations: {
|
|
get: {},
|
|
getAll: {
|
|
overrideFn: import { getAllTasks } from "@src/tasks.js",
|
|
},
|
|
create: {
|
|
overrideFn: import { createTask } from "@src/tasks.js",
|
|
},
|
|
update: {},
|
|
delete: {},
|
|
},
|
|
}
|
|
|
|
job simplePrintJob {
|
|
executor: PgBoss,
|
|
schedule: {
|
|
cron: "* * * * *",
|
|
},
|
|
perform: {
|
|
fn: import { simplePrint } from "@src/jobs.js",
|
|
},
|
|
entities: [Task]
|
|
}
|
|
|
|
action customSignup {
|
|
fn: import { signup } from "@src/auth.js",
|
|
} |