$ git clone https://github.com/ysnbogt/sveltekit-t3-app-template
$ cd sveltekit-t3-app-template
$ npm i
$ npx prisma migrate dev # Execute after setting up below.
$ npm run dev
.env
GITHUB_CLIENT_ID=""
GITHUB_CLIENT_SECRET=""
AUTH_SECRET=""
DATABASE_URL="file:./dev.db"
Execute the following command and paste it into the .env
file AUTH_SECRET
$ openssl rand -hex 32 | pbcopy
- Move to https://github.com/settings/apps
- Click the New GitHub App button on the GitHub Apps tab
- Enter various information such as GitHub App name
- Click Create GitHub App button
- Copy and paste the Client ID from About into the
.env
fileGITHUB_CLIENT_ID
- Click Generate a new client secret button in Client secrets
- Copy and paste Client secret into
GITHUB_CLIENT_SECRET
in.env
- Go to https://app.supabase.com/project
- Click + New Project button
- Create a new project Fill in each field and click the Create new project button
- Click on the Project Settings tab at the bottom of the left sidebar
- Go to
Settings > Project Settings > Database
- Match each information in
Connection info
to the formatDATABASE_URL="postgresql://${User}:${Password}@${Host}:${Port}?schema=public"
- Paste into an
.env
file
Note
To reflect the database, delete./prisma/migrations
and then execute the following command.
You can also usemake prisma-update
.$ npx prisma migrate dev --name init && npx prisma generate > yIf you are using
npx prisma studio
, stop prisma studio with Ctrl + c and run it again.
Note
The sample program is very crude.