Back to articles
Wasp Has a Free API: Build Full-Stack React Apps with a Single Config File
How-ToSystems

Wasp Has a Free API: Build Full-Stack React Apps with a Single Config File

via Dev.to TutorialAlex Spinov

What is Wasp? Wasp is a full-stack web framework that uses a simple DSL (domain-specific language) to define your entire app — routes, pages, auth, database, jobs, APIs — in a single .wasp config file. It generates React + Node.js + Prisma code. Quick Start curl -sSL https://get.wasp-lang.dev/installer.sh | sh wasp new my-app cd my-app wasp start The .wasp Config app MyApp { wasp: { version: "^0.14.0" }, title: "My SaaS App", auth: { userEntity: User, methods: { email: {}, google: {}, github: {} }, onAuthFailedRedirectTo: "/login" }, db: { system: PostgreSQL } } // Routes route HomeRoute { path: "/", to: HomePage } route DashboardRoute { path: "/dashboard", to: DashboardPage } // Pages page HomePage { component: import { HomePage } from "@src/pages/Home" } page DashboardPage { authRequired: true, component: import { DashboardPage } from "@src/pages/Dashboard" } // Database entities entity User {=psl id Int @id @default(autoincrement()) email String @unique tasks Task[] psl=} entity Tas

Continue reading on Dev.to Tutorial

Opens in a new tab

Read Full Article
2 views

Related Articles