Skip to content

BounceSecurity/prisma-playground-simulator

Repository files navigation

prisma-playground-simulator

Introduction

This is designed to be an offline version of the Prisma Playground as I found that the online version sometimes errors out and can sometimes be a little slow.

Note that rather than scrape the data in the Playground database, this project uses Faker to create the data but the schema should still be compatible.

Note that this repo is based on the template that Prisma uses to demonstrate its Client Extensions, e.g. this one so thanks to them for that 😀

How to use

Prerequisites

1. Download example & install dependencies

Clone this repository:

git clone git@github.com:BounceSecurity/prisma-playground-simulator.git

Create a .env file and install dependencies:

cd prisma-sqli
cp .env.example .env
npm install

2. Start the database

Run the following command to start a new Postgres database in a Docker container:

docker compose up -d

3. Run migrations

Run this command to apply migrations to the database:

npx prisma migrate deploy

4. Seed the database

Run the following command to add seed data to the database:

npx prisma db seed

5. Run the dev script

To run the Javascript version of the simulator, run the following command:

npm run dev

To run the Typescript version of the simulator, run the following command:

npm run devts

(You may need agree to install tsx)

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published