{"id":18464917,"url":"https://github.com/neondatabase/neon-vercel-rawsql","last_synced_at":"2025-04-08T08:31:31.826Z","repository":{"id":103222909,"uuid":"599695073","full_name":"neondatabase/neon-vercel-rawsql","owner":"neondatabase","description":"Example use of Neon serverless driver on Vercel Edge Functions with raw SQL","archived":false,"fork":false,"pushed_at":"2024-12-06T14:47:00.000Z","size":890,"stargazers_count":4,"open_issues_count":0,"forks_count":2,"subscribers_count":10,"default_branch":"main","last_synced_at":"2025-03-23T09:23:58.840Z","etag":null,"topics":["neon","postgresql","serverless","sql","vercel","vercel-edge-functions"],"latest_commit_sha":null,"homepage":"https://neon.tech","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/neondatabase.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,"publiccode":null,"codemeta":null}},"created_at":"2023-02-09T17:28:09.000Z","updated_at":"2024-12-11T01:03:31.000Z","dependencies_parsed_at":"2023-12-20T10:48:13.636Z","dependency_job_id":"16a3d3f4-11fe-4645-b1cb-5a9218fc7dcd","html_url":"https://github.com/neondatabase/neon-vercel-rawsql","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/neondatabase%2Fneon-vercel-rawsql","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/neondatabase%2Fneon-vercel-rawsql/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/neondatabase%2Fneon-vercel-rawsql/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/neondatabase%2Fneon-vercel-rawsql/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/neondatabase","download_url":"https://codeload.github.com/neondatabase/neon-vercel-rawsql/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247804478,"owners_count":20998992,"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":["neon","postgresql","serverless","sql","vercel","vercel-edge-functions"],"created_at":"2024-11-06T09:11:32.050Z","updated_at":"2025-04-08T08:31:31.490Z","avatar_url":"https://github.com/neondatabase.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# neon-vercel-rawsql\n\nThis repo demonstrates using raw SQL with [Neon's serverless driver](https://www.npmjs.com/package/@neondatabase/serverless) on [Vercel](https://vercel.com/) Edge Functions.\n\nWe implement a simple app that generates a JSON listing of the user's nearest 10 UNESCO World Heritage sites via IP geolocation (data copyright © 1992 – 2022 [UNESCO/World Heritage Centre](https://whc.unesco.org/en/syndication/)).\n\n## Deploy\n\n* Ensure the `psql` client is installed.\n\n* Create a Neon database and make a note of the connection string from the [Neon console](https://console.neon.tech/).\n\n* Clone this repo, then:\n\n```bash\n# get dependencies\nnpm install\nnpm install -g vercel@latest\n\n# create DATABASE_URL environment variable, remote and local\nnpx vercel env add DATABASE_URL  # paste in the connection string and select all environments\nnpx vercel env pull .env.local  # now bring it down into ./.env.local for local use\n\n# create the schema and copy data to DB\n(source .env.local \\\n \u0026\u0026 curl -s https://gist.githubusercontent.com/jawj/a8d53ff339707c65128af83b4783f4fe/raw/45dbcc819b00ecb72f80b0cf91e01b3d055662b5/whc-sites-2021.psql \\\n | psql $DATABASE_URL)\n\n# test\nnpx vercel dev\n\n# ... and deploy\nnpx vercel deploy\n```\n\n## Feedback and support\n\nPlease visit [Neon Community](https://community.neon.tech/) or [Support](https://neon.tech/docs/introduction/support).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fneondatabase%2Fneon-vercel-rawsql","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fneondatabase%2Fneon-vercel-rawsql","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fneondatabase%2Fneon-vercel-rawsql/lists"}