Skip to content

Latest commit

 

History

History

pm-app

PM Camp Demo

A Project Management app built with Remix 💿

Development

This project uses Docker to run a Postgres database and Prisma to bootstrap its tables and query the data. Before moving forward you'll need to install and run Docker. Prisma is installed locally in the project's npm dependencies.

  1. Download this directory, then cd into the project directory:
cd pm-app
  1. Copy .env.example to create a new file .env:
cp .env.example .env
  1. Copy docker-compose.example.yml to create a new file docker-compose.yml:
cp docker-compose.example.yml docker-compose.yml
  1. Create a username and password for your database in docker-compose.yml. You can use any values you want here. For example:
environment:
  - POSTGRES_USER=chance
  - POSTGRES_PASSWORD=yolo2022
  1. Use the same username and password values to confingue your database URL in .env. See the Prisma guide for PostgreSQL for more information.. For example:
DATABASE_URL="postgresql:https://chance:yolo2022@localhost:5432/pm-app?schema=public"

NOTE: in a real app you wouldn't want the database URL and username/password to be committed to your repository. Those should be environment variables set via your hosting provider's dashboard/cli.

  1. Install the project's dependencies with npm:
npm install
  1. Make sure Docker is running (I like to use Docker Desktop). Once it's up, run the db:start script:
npm run db:start
  1. Run the db:reset script to setup the project's database.
npm run db:reset

NOTE: If you update the database schema, you'll need to run npm run db:update to update the tables.

  1. Run the dev server to start your app on http:https://localhost:3000:
npm run dev