wasp/examples/waspleau/main.wasp
2023-03-01 17:14:14 +01:00

61 lines
1.1 KiB
JavaScript

app waspleau {
wasp: {
version: "^0.8.0"
},
title: "Waspleau",
server: {
setupFn: import serverSetup from "@server/serverSetup.js"
},
db: { system: PostgreSQL },
dependencies: [
("axios", "^0.27.2")
]
}
job github {
executor: PgBoss,
perform: {
fn: import { workerFunction } from "@server/workers/github.js"
},
schedule: {
cron: "*/10 * * * *"
},
entities: [Datum]
}
job loadTime {
executor: PgBoss,
perform: {
fn: import { workerFunction } from "@server/workers/loadTime.js"
},
schedule: {
cron: "*/5 * * * *",
args: {=json {
"url": "https://wasp-lang.dev",
"name": "wasp-lang.dev Load Time"
} json=}
},
entities: [Datum]
}
entity Datum {=psl
id Int @id @default(autoincrement())
name String @unique
value String
updatedAt DateTime @updatedAt
psl=}
route RootsRoute { path: "/", to: MainPage }
page MainPage {
component: import Main from "@client/MainPage.jsx"
}
query dashboard {
fn: import { refreshDashboardData } from "@server/dashboard.js",
entities: [Datum]
}