A small Hono REST API using Prisma ORM and Prisma Postgres, ready to deploy to Prisma Compute with one click.
Clicking the link copies this repository into a new repository under your
GitHub account, provisions a Prisma Postgres database, sets DATABASE_URL
for you, and starts the first deployment. After that, every push to your
copy's default branch deploys automatically.
Prisma Compute deploys any public TypeScript repository that has these files at its root:
prisma.compute.json— tells Prisma Compute how to run the apppackage.json- a lockfile (
bun.lock,package-lock.json,pnpm-lock.yaml, oryarn.lock)
bun install
cp .env.example .env
# Authenticate once, then create a Prisma Postgres database.
bun run compute:login
bun run compute:database:create
# Copy the printed DATABASE_URL into .env.
bun run db:generate
bun run db:migrate --name init
bun run db:seed
bun run devOpen http://localhost:8080. The JSON endpoint is available at http://localhost:8080/api/users.
Connect this repository to a Prisma Compute project. Every push to the connected branch then builds and deploys automatically.
bun run compute:connectAfter connecting, open the running service with:
bun run compute:openEach push creates a build. To stream the full build log, copy the build ID from the GitHub check run and run:
npx -y @prisma/cli@next build logs <build-id>