Wasp

1 min read Original article ↗

app todoApp {

title: "ToDo App", // visible in the browser tab

auth: { // full-stack auth out-of-the-box

userEntity: User,

methods: { google: {}, gitHub: {}, email: {...} }

}

}

route RootRoute { path: "/", to: MainPage }

page MainPage {

authRequired: true, // Limit access to logged in users.

component: import Main from "@client/Main" // Your React code.

}

query getTasks {

fn: import { getTasks } from "@server/tasks", // Your Node.js code.

entities: [Task] // Automatic cache invalidation.

}