Example of using Prisma directly on a front end with Elysia Fn.
On Elysia 0.3, you can expose any backend function to run on the front end, with auto-completion and type-safety.
Note: Elysia Eden 0.3 is currently under heavy development which means it might have a bug, the API may change anytime, and not recommended for production usage.
pnpm i
The connection string should look something like this:
prisma://aws-us-east-1.prisma-data.com/?api_key=xxxxxxxxxxx
apps/server/.env
as a reference in apps
/server/.env.example` and paste the connection string in:DIRECT_URL=postgresql://username:password@localhost:5432/table
DATABASE_URL=prisma://aws-us-east-1.prisma-data.com/?api_key=xxxxxxxxxxx
pnpm migrate
pnpm dev