This is an example data source to retrieve our dataset using Netlify Edge Functions.
- Netlify uses Deno as a runtime, so
database-jsneeds to be pulled from a CDN. This can be seen in data.json.ts - Netlify requires edge functions to exist under
netlify/edge-functionssubdirectory.
- Run
npm install - Run
npm run devto start the app locally. - Run
npx netlify build - Run
npx netlify deploy --prodto deploy to Netlify. - Run
npx netlify env:set DATABASE_URL ...to configure the database credential needed.