Atinux / how-is-this-not-illegal

A demo of using Nuxt Server Components and Vercel Postgres, legally

Home Page:https://how-is-this-not-illegal-nuxt.vercel.app

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

How is this not illegal (Nuxt)

My personal attempt to use Postgres directly from a Nuxt Server Component.

Based from Guillermo's How is this not illegal Next.js example.

Bonus: I added an input to dynamically control the limit returned by the server component :sparkes:

Setting it up

  1. Create a Vercel Postgres database and link it to your project
  2. Go to its settings and copy the psql command
  3. Add -f sql/init.sql like so to populate the database with some data:
    psql "postgres://{user}:{password}@{name}.{location}.postgres.vercel-storage.com:5432/verceldb" -f init.sql

Running it locally

pnpm i
pnpm dev

About

A demo of using Nuxt Server Components and Vercel Postgres, legally

https://how-is-this-not-illegal-nuxt.vercel.app


Languages

Language:Vue 72.7%Language:TypeScript 19.6%Language:JavaScript 7.7%