Database
Launch Express uses Prisma ORM to interact with the database. Prisma is a modern database toolkit that makes it easy to interact with databases in Node.js and TypeScript.
Launch Express supports the following database providers:
PostgreSQL Prisma Schema
Launch Express provides you with a prisma.schema file suitable for PostgreSQL. If you want to use PostgreSQL, you don’t need to make any changes.
To learn more about the Prisma usage with PostgreSQL check the official documentation.
- Update your DATABASE_URL in the .env file
- Generate Prisma Client:
- Run migrations:
PostgreSQL Prisma Schema
Launch Express provides you with a prisma.schema file suitable for PostgreSQL. If you want to use PostgreSQL, you don’t need to make any changes.
To learn more about the Prisma usage with PostgreSQL check the official documentation.
- Update your DATABASE_URL in the .env file
- Generate Prisma Client:
- Run migrations:
MongoDB Prisma Schema
Launch Express provides you with a prisma.schema file suitable for MongoDB. Simply replace the prisma.schema with prisma.mongodb.schema
To learn more about the Prisma usage with MongoDB check the official documentation.
- Update your DATABASE_URL in the .env file
- Make a backup of your schema:
- Replace the prisma.schema file with prisma.mongodb.schema
- Generate Prisma Client:
- Run migrations:
MySQL Prisma Schema
Launch Express provides you with a prisma.schema file suitable for MySQL. Simply replace the prisma.schema with prisma.mysql.schema
To learn more about the Prisma usage with MySQL check the official documentation.
- Update your DATABASE_URL in the .env file
- Make a backup of your schema:
- Replace the prisma.schema file with prisma.mysql.schema
- Generate Prisma Client:
- Run migrations:
SQLite Prisma Schema
Launch Express provides you with a prisma.schema file suitable for SQLite. Simply replace the prisma.schema with prisma.sqlite.schema
To learn more about the Prisma usage with SQLite check the official documentation.
- Update your DATABASE_URL in the .env file
- Make a backup of your schema:
- Replace the prisma.schema file with prisma.sqlite.schema
- Generate Prisma Client:
- Run migrations:
Example Usage
To interact with the database, you can use the Prisma Client. The Prisma Client is an auto-generated and type-safe query builder that’s tailored to your database schema.
If you want to include some additional Better-Auth plugins, you have to run the following command:
That insures, that the schema is up to date and includes the additional plugins. After that you have to run the following command to generate the Prisma Client:
Database Management
Development Commands
Production Commands
Database Hosting
I recommend using PostgreSQL as the database provider for your application, because it is a powerful, open-source object-relational database system.
You can create a free PostgreSQL database by using Neon, Supabase or go with MongoDB and MongoDB Atlas.
But you can also use other service providers like: