8000 GitHub - prisma/chat-with-policy
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

prisma/chat-with-policy

Repository files navigation

Chat With Policy

0. Setup

  1. Clone this repository

  2. Run pnpm install

1. Setup Prisma

  1. As usual, you need to get Prisma configured.

  2. Get your PPg URL and put it in .env.

  3. Migrate your database against the schema.

2. Define your rules

Go to rules.ts and define your rules.

3. Deploy your rules

Run pnpm prisma rules deploy ... to deploy your rules.

To make things simpler, we've created an npm script to deploy the rules.

pnpm rules:deploy

Check out your package.json to see how it's done.

On the first run it may take a bit of time, because the CLI is downloaded and cached.
Subsequent runs will be faster, and will only redownload if a new version is available.

4. Access your client

The previous step will return a JWT token, that we'll call <publicKey>.

Go to App.tsx and replace <publicKey> with the token you received.

5. Execute queries

Run pnpm dev to execute your app and start sending queries.

About

No description, website, or topics provided.

Resources

Code of conduct

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •  
3519
0