wasp/examples/waspleau/main.wasp
2022-06-02 14:27:08 -04:00

55 lines
1.0 KiB
JavaScript

app waspleau {
title: "Waspleau",
server: {
setupFn: import serverSetup from "@ext/serverSetup.js"
},
db: { system: PostgreSQL },
dependencies: [
("axios", "^0.21.1")
]
}
job github {
executor: PgBoss,
perform: {
fn: import { workerFunction } from "@ext/workers/github.js"
},
schedule: {
cron: "*/10 * * * *"
}
}
job loadTime {
executor: PgBoss,
perform: {
fn: import { workerFunction } from "@ext/workers/loadTime.js"
},
schedule: {
cron: "*/5 * * * *",
args: {=json {
"url": "https://wasp-lang.dev",
"name": "wasp-lang.dev Load Time"
} json=}
}
}
entity Metric {=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 "@ext/MainPage.js"
}
query dashboard {
fn: import { refreshDashboardData } from "@ext/dashboard.js",
entities: [Metric]
}