A tiny example that implements token based authentication in bun and elysia.
Inspirations from this blog post by Mihai-Adrian Andrei.
bun i
to install the necessary packages.bunx prisma generate
to initialize the sqlite database from the prisma schema file.DATABASE_URL
(since I used sqlite this was set to file:./dev.db
)JWT_ACCESS_SECRET
JWT_REFRESH_SECRET
bun run dev
to start the application.