Skip to content

5hanazar/sveltekit-prisma

Repository files navigation

Demo

demo.gif

Setup

Clone the repo and install dependencies with npm install (or pnpm install or yarn).
Create .env file and set the following variables:

#MySQL connection URL
DATABASE_URL="mysql://username:password@localhost:3306/database"

#JWT secret key
PRIVATE_KEY="key"

Generate a Prisma migration:

npx prisma migrate dev --name init
npx prisma generate

Seed the database:

npx prisma db seed

Developing

Start a development server:

npm run dev

Building

To create a production version of your app:

npm run build