Database
This guide covers the database setup and configuration for your SaaS application using LaunchPadjs.
LaunchPadjs uses Prisma ORM to provide a collection of database utilities for your site. While Prisma ORM supports multiple databases, this documentation focuses on using PostgreSQL, which is the preferred setup for LaunchPadjs projects, but you can use any database you want, like PostgreSQL, MySQL, or SQLite.
Database Setup
Custom Database
The database connection is configured in lib/prisma.ts
Ensure that DATABASE_URL environment variable is set for the database connection to work. You can use any of the free databases like Supabase, Neon, etc and setup a new database and configure the DATABASE_URL environment variable accordingly.
For postgres you can use the following command to create a new database.
It will create a new database and run the migrations. It should also generate prisma client in node_modules/@prisma/client
if not you can run the following command to generate it.
To view your databse in the browser you can use the following command.
It will start a new studio in the browser.
That's it you are ready to go.