Database Setup
HyperLaunch uses Neon, a serverless Postgres database with a generous free tier
Setting up Neon
- Go to neon.tech and create an account
- Create a new project
- Copy your connection string from the connection details page
Your connection string should look something like this
postgresql://neondb_owner:aaa_a123@some-random-words-aaaaa-pooler.eastus2.azure.neon.tech/neondb?sslmode=require
Configuration
In your .env.local
file, add the following environment variables:
Note: Currently, both
DATABASE_URL
andAUTH_DRIZZLE_URL
must point to the same connection string. This is a known limitation that will be simplified in a future update to use a single environment variable.
Database script
With our connection string added in our .env.local
file, we can now run the database script:
This script will install your dependencies with pnpm, run your database migrations and clean up the project git history.
You can have a look in your schema.ts
to see the tables about to be added to.