$ 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
.env
file GITHUB_CLIENT_ID
GITHUB_CLIENT_SECRET
in .env
Settings > Project Settings > Database
Connection info
to the format DATABASE_URL="postgresql://${User}:${Password}@${Host}:${Port}?schema=public"
.env
fileNote
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 > y
If you are using
npx prisma studio
, stop prisma studio with Ctrl + c and run it again.
Note
The sample program is very crude.