/scratchy

A majestic monolith. My magical code playground that I can do whatever I want with.

Primary LanguageTypeScript

Scratchy

Getting Started

Boot Docker services

docker-compose up -d

Install Dependencies

pnpm install

The install command should also run this next generator for you in a 'postinstall' hook. This generates the prisma client for the backend, and the api client library for sveltekit. You can rerun the command with the following.

pnpm -r gen

Next, initialize & seed the database. This creates the actual database, and runs all migrations for you. Then it runs a seed command for you that sets up some sample data.

Note: If you see the error User scratchy was denied access on the database scratchy.public, you will need to check if the postgres running on port 5432. Likely, you have multiple postgres servers running on your host machine, and the one running on port 5432 is not able to authenticate with the scratchy user.

pnpm db

Start dev mode, either use overmind or look in the Procfile and use that as a starting point. You need the api and web, the generators are optional.

overmind start

Graphql

After booting the api, you can nav to the graphiql editor here: http://localhost:5000/graphiql