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
You can now open your HyperLaunch project with your favorite code editor. The script we ran before copied the demo variable in .env.local to your secret .env.local. This .env.local should never be exposed to the public.
In your .env.local
file, add the following environment variables:
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.
Before we can start our app, we need to set up Auth.