wasp/examples/realworld/main.wasp

57 lines
1.1 KiB
JavaScript
Raw Normal View History

app Conduit {
title: "Conduit"
}
route "/" -> page Main
page Main {
component: import Main from "@ext/MainPage.js"
}
route "/login" -> page Login
page Login {
component: import Login from "@ext/LoginPage.js"
}
route "/register" -> page Signup
page Signup {
component: import Signup from "@ext/SignupPage.js"
}
route "/settings" -> page UserSettings
page UserSettings {
component: import UserSettings from "@ext/UserSettingsPage.js"
}
route "/@:username" -> page UserProfile
page UserProfile {
component: import UserProfile from "@ext/UserProfilePage.js"
}
entity User {=psl
id Int @id @default(autoincrement())
username String @unique
email String @unique
password String
bio String?
profilePictureUrl String?
psl=}
auth {
userEntity: User,
methods: [ EmailAndPassword ]
}
action signup {
fn: import { signup } from "@ext/actions.js",
entities: [User]
}
action updateUser {
fn: import { updateUser } from "@ext/actions.js",
entities: [User]
}
query getUser {
fn: import { getUser } from "@ext/queries.js",
entities: [User]
}