diff --git a/README.md b/README.md index 27b4e3f..40161bd 100644 --- a/README.md +++ b/README.md @@ -41,3 +41,25 @@ bun run dev Open [http://localhost:8080](http://localhost:8080). The JSON endpoint is available at [http://localhost:8080/api/users](http://localhost:8080/api/users). + +## Connect and deploy + +Connect this repository to a Prisma Compute project. Every push to the +connected branch then builds and deploys automatically. + +```bash +bun run compute:connect +``` + +After connecting, open the running service with: + +```bash +bun run compute:open +``` + +Each push creates a build. To stream the full build log, copy the build ID +from the GitHub check run and run: + +```bash +npx -y @prisma/cli@next build logs +``` diff --git a/package.json b/package.json index 745062e..87ff391 100644 --- a/package.json +++ b/package.json @@ -10,11 +10,10 @@ "db:generate": "prisma generate", "db:migrate": "prisma migrate dev", "db:seed": "prisma db seed", - "compute:login": "bunx @prisma/cli@latest auth login", - "compute:database:create": "bunx @prisma/cli@latest database create compute-deploy-example --branch main", - "compute:deploy": "bunx @prisma/cli@latest app deploy --env .env", - "compute:open": "bunx @prisma/cli@latest app open", - "compute:logs": "bunx @prisma/cli@latest app logs" + "compute:login": "bunx @prisma/cli@next auth login", + "compute:database:create": "bunx @prisma/cli@next postgres create compute-deploy-example --branch main", + "compute:connect": "bunx @prisma/cli@next git connect", + "compute:open": "bunx @prisma/cli@next service open" }, "dependencies": { "@hono/node-server": "2.0.4",