Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/rauchg/how-is-this-not-illegal

A demo of using RSC and Vercel Postgres, legally
https://github.com/rauchg/how-is-this-not-illegal

Last synced: 3 days ago
JSON representation

A demo of using RSC and Vercel Postgres, legally

Awesome Lists containing this project

README

        

## How is this not illegal

This beautiful tweet by Dan Abramov [brought to life](https://github.com/rauchg/how-is-this-not-illegal/blob/main/app/page.js#L5).

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:
```sh
psql "postgres://{user}:{password}@{name}.{location}.postgres.vercel-storage.com:5432/verceldb" -f init.sql
```