Skip to content

xpertekShaun/attendance

 
 

Repository files navigation

SvelteKit Auth

✍️ https://joyofcode.xyz/sveltekit-authentication-using-cookies

Learn SvelteKit authentication using cookies.

Project Setup

🧑‍🤝‍🧑 Clone the project

git clone https://github.com/joysofcode/sveltekit-auth-cookies.git

📦️ Install dependencies

You can use npm or yarn.

pnpm i

Database

✏️ Rename .env.example to .env

DATABASE_URL="file:./dev.db"

🔨 Create the database from the Prisma schema

pnpx prisma db push

🔎 Inspect your database with Prisma Studio

pnpx prisma studio

🧑 Add user roles

Open Prisma Studio at http://localhost:5555/ and inside the Roles table press Add record to add the ADMIN and USER roles by entering the role name and pressing Save for each one.

Development

🦄 Start the project and open http://localhost:5173/

pnpm run dev

Production

🔨 Build and preview

pnpm run build && pnpm run preview

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 44.9%
  • Svelte 37.7%
  • JavaScript 8.9%
  • CSS 6.8%
  • HTML 1.7%