Skip to content

alexmacarthur/how-is-this-not-illegal

 
 

Repository files navigation

How is this not illegal

This beautiful tweet by Dan Abramov brought to life.

Dan Abramov's tweet jokingly suggesting querying Postgres directly from a React component should be illegal

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

About

A demo of using RSC and Vercel Postgres, legally

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 63.7%
  • TypeScript 29.6%
  • CSS 6.7%