{"id":19683896,"url":"https://github.com/prisma/nextjs-edge-functions","last_synced_at":"2025-04-29T05:31:33.091Z","repository":{"id":219086164,"uuid":"748121846","full_name":"prisma/nextjs-edge-functions","owner":"prisma","description":"Demo of using Next.js with Prisma ORM deployed to Vercel Edge Functions","archived":false,"fork":false,"pushed_at":"2024-03-06T12:54:44.000Z","size":105,"stargazers_count":5,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-04-20T11:00:01.597Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://nextjs-edge-functions-umber.vercel.app/","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/prisma.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2024-01-25T10:17:30.000Z","updated_at":"2025-02-25T03:05:07.000Z","dependencies_parsed_at":"2024-03-05T16:28:07.837Z","dependency_job_id":"0b054dd9-4f29-4796-9160-910bcdbf3c13","html_url":"https://github.com/prisma/nextjs-edge-functions","commit_stats":null,"previous_names":["prisma/nextjs-edge-functions"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/prisma%2Fnextjs-edge-functions","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/prisma%2Fnextjs-edge-functions/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/prisma%2Fnextjs-edge-functions/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/prisma%2Fnextjs-edge-functions/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/prisma","download_url":"https://codeload.github.com/prisma/nextjs-edge-functions/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251444533,"owners_count":21590514,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-11T18:16:01.240Z","updated_at":"2025-04-29T05:31:32.791Z","avatar_url":"https://github.com/prisma.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Prisma ORM \u0026 Vercel Edge Functions (Example)\n\nThis sample application deploys a Next.js API route that uses Prisma ORM to Vercel Edge Functions. Support for running inside of edge functions is currently in Preview in Prisma ORM, you can learn more [here]().\n\n[![Deploy with Vercel](https://vercel.com/button)](https://vercel.com/new/clone?repository-url=https%3A%2F%2Fgithub.com%2Fprisma%2Fnextjs-edge-functions)\n\n## Prerequisites\n\nA [Vercel Postgres](https://vercel.com/docs/storage/vercel-postgres) or [Neon](https://neon.tech/) database (Vercel Postgres uses Neon under the hood, so you can choose either for this project).\n\n\n## Usage\n\n### 1. Clone repo\n\n```\ngit clone git@github.com:prisma/nextjs-edge-functions.git\ncd nextjs-edge-functions\n```\n\n### 2. Configure database connection\n\nAdd the connection URLs that you received after setting up the Vercel Postgres (or Neon) database to the [`.env`](./.env) file. \n```bash\nPOSTGRES_PRISMA_URL=\"your-db-connection-string-with-pgbouncer=true\"\nPOSTGRES_URL_NON_POOLING=\"your-db-connection-string\"\n```\n\nThe values may look similar to this:\n\n```bash\nPOSTGRES_PRISMA_URL=\"postgres://default:password@ep-wild-voice-61367780-pooler.us-east-1.postgres.vercel-storage.com:5432/verceldb?pgbouncer=true\u0026connect_timeout=15\"\nPOSTGRES_URL_NON_POOLING=\"postgres://default:password@ep-wild-voice-61367780.us-east-1.postgres.vercel-storage.com:5432/verceldb\"\n```\n\n### 3. Install dependencies\n\n```\nnpm install\n```\n\n### 4. Create tables \u0026 seed database\n\n```\nnpx prisma migrate dev\nnpx prisma db seed\n```\n\n### 5. Run the app\n\n```\nnpm run dev\n```\n\n### 6. Deploy the app\n\nTo deploy the app, you can use the [Vercel CLI](https://vercel.com/docs/cli):\n\n```\nvercel deploy\n```\n\n### 7. Set the environment variables\n\nConfigure the environment variables in your Vercel project, e.g. via the dashboard UI or the [`vercel env`](https://vercel.com/docs/cli/env) CLI command:\n\n- `NEXT_PUBLIC_API_URL`: The domain of your deployed app on Vercel\n- `POSTGRES_PRISMA_URL`: The database URL that uses conneciton pooling\n- `POSTGRES_URL_NON_POOLING`: The database URL that connects dirctly to your database\n\n### 8. Re-deploy the project on Vercel\n\nManually re-deploy your project in Vercel to make the new environment variable configuration take effect. Select the latest deployment from the **Deployment** tab, click the **・・・** and then click **Redeploy**.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprisma%2Fnextjs-edge-functions","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fprisma%2Fnextjs-edge-functions","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprisma%2Fnextjs-edge-functions/lists"}