1
mirror of https://github.com/jakejarvis/jarv.is.git synced 2025-04-26 09:05:22 -04:00

point prisma to vercel postgres

This commit is contained in:
Jake Jarvis 2023-06-17 21:24:12 -04:00
parent fd12689a49
commit d058279609
Signed by: jake
GPG Key ID: 2B0C9CF251E69A39
7 changed files with 27 additions and 10 deletions

View File

@ -1,9 +1,15 @@
AIRTABLE_API_KEY= AIRTABLE_API_KEY=
AIRTABLE_BASE= AIRTABLE_BASE=
DATABASE_URL=
GH_PUBLIC_TOKEN= GH_PUBLIC_TOKEN=
HCAPTCHA_SECRET_KEY= HCAPTCHA_SECRET_KEY=
NEXT_PUBLIC_HCAPTCHA_SITE_KEY= NEXT_PUBLIC_HCAPTCHA_SITE_KEY=
POSTGRES_DATABASE=
POSTGRES_HOST=
POSTGRES_PASSWORD=
POSTGRES_PRISMA_URL=
POSTGRES_URL=
POSTGRES_URL_NON_POOLING=
POSTGRES_USER=
SENTRY_AUTH_TOKEN= SENTRY_AUTH_TOKEN=
SENTRY_DSN= SENTRY_DSN=
SPOTIFY_CLIENT_ID= SPOTIFY_CLIENT_ID=

View File

@ -5,7 +5,7 @@
[![Licensed under CC-BY-4.0](https://img.shields.io/badge/license-CC--BY--4.0-fb7828?logo=creative-commons&logoColor=white)](LICENSE) [![Licensed under CC-BY-4.0](https://img.shields.io/badge/license-CC--BY--4.0-fb7828?logo=creative-commons&logoColor=white)](LICENSE)
[![GitHub repo size](https://img.shields.io/github/repo-size/jakejarvis/jarv.is?color=009cdf&label=repo%20size&logo=git&logoColor=white)](https://github.com/jakejarvis/jarv.is) [![GitHub repo size](https://img.shields.io/github/repo-size/jakejarvis/jarv.is?color=009cdf&label=repo%20size&logo=git&logoColor=white)](https://github.com/jakejarvis/jarv.is)
My humble abode on the World Wide Web, created and deployed using [Next.js](https://nextjs.org/), [Stitches](https://stitches.dev/), [PlanetScale](https://planetscale.com/), [Vercel](https://vercel.com/), [and more](https://jarv.is/humans.txt). My humble abode on the World Wide Web, created and deployed using [Next.js](https://nextjs.org/), [Stitches](https://stitches.dev/), [Prisma](https://www.prisma.io/), [Vercel](https://vercel.com/), [and more](https://jarv.is/humans.txt).
I keep an ongoing list of [post ideas](https://github.com/jakejarvis/jarv.is/issues/1) and [coding to-dos](https://github.com/jakejarvis/jarv.is/issues/714) as issues in this repo. Outside contributions, improvements, and/or corrections are welcome too! I keep an ongoing list of [post ideas](https://github.com/jakejarvis/jarv.is/issues/1) and [coding to-dos](https://github.com/jakejarvis/jarv.is/issues/714) as issues in this repo. Outside contributions, improvements, and/or corrections are welcome too!

View File

@ -48,9 +48,9 @@ const Privacy = () => {
<p> <p>
A very simple hit counter on each blog post tallies an aggregate number of pageviews (i.e.{" "} A very simple hit counter on each blog post tallies an aggregate number of pageviews (i.e.{" "}
<CodeInline>hits = hits + 1</CodeInline>) in a <Link href="https://planetscale.com/">PlanetScale</Link> SQL <CodeInline>hits = hits + 1</CodeInline>) in a{" "}
database. Individual views and identifying (or non-identifying) details are{" "} <Link href="https://vercel.com/storage/postgres">Vercel Postgres</Link> database. Individual views and
<strong>never stored or logged</strong>. identifying (or non-identifying) details are <strong>never stored or logged</strong>.
</p> </p>
<p> <p>

View File

@ -0,0 +1,7 @@
-- CreateTable
CREATE TABLE "hits" (
"slug" VARCHAR(128) NOT NULL,
"hits" INTEGER NOT NULL DEFAULT 1,
CONSTRAINT "hits_pkey" PRIMARY KEY ("slug")
);

View File

@ -0,0 +1,3 @@
# Please do not edit this file manually
# It should be added in your version-control system (i.e. Git)
provider = "postgresql"

View File

@ -1,11 +1,13 @@
generator client { generator client {
provider = "prisma-client-js" provider = "prisma-client-js"
previewFeatures = ["jsonProtocol"]
} }
datasource db { datasource db {
provider = "mysql" provider = "postgresql"
url = env("DATABASE_URL") url = env("POSTGRES_PRISMA_URL")
relationMode = "prisma" directUrl = env("POSTGRES_URL_NON_POOLING")
shadowDatabaseUrl = env("POSTGRES_URL_NON_POOLING")
} }
model hits { model hits {

View File

@ -32,7 +32,6 @@
- Vercel - Vercel
- Stitches - Stitches
- Prisma - Prisma
- PlanetScale
- Giscus - Giscus
- Fathom Analytics - Fathom Analytics
- ...and more: https://jarv.is/uses/ - ...and more: https://jarv.is/uses/