Skip to content

Commit

Permalink
updating README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
jstnmthw committed Sep 18, 2023
1 parent 1e89edf commit c385e03
Showing 1 changed file with 20 additions and 6 deletions.
26 changes: 20 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,11 @@ This is a boilerplate starter-kit for building a GraphQL API with [NestJS](https
- [Overview](#overview)
- [Prisma Setup](#prisma-setup)
- [1. Install Dependencies](#1-install-dependencies)
- [2. PostgreSQL with Docker](#2-PostgreSQL-with-docker)
- [3. Prisma: Migrate](#3-prisma-migrate)
- [4. Prisma: Client JS](#4-prisma-client-js)
- [2. Database with Docker](#2-database-with-docker)
- [MySQL](#mysql)
- [PostgreSQL](#postgresql)
- [3. Prisma Migrate](#3-prisma-migrate)
- [4. Prisma Client JS](#4-prisma-client-js)
- [5. Seed the database data with this script](#5-seed-the-database-data-with-this-script)
- [6. Start NestJS Server](#6-start-nestjs-server)
- [GraphQL Playground](#graphql-playground)
Expand Down Expand Up @@ -67,16 +69,28 @@ npm install
yarn install
```

### 2. PostgreSQL with Docker
### 2. Database with Docker

#### MySQL

Set up a development MySQL with Docker. Copy [.env.example](./.env.example) and rename to `.env` - `cp .env.example .env` - which sets the required environments for MySQL such as `MYSQL_USER`, `MYSQL_PASSWORD` and `MYSQL_DATABASE`. Update the variables as you wish and select a strong password.

Start the MySQL database

```bash
docker-compose -f docker-compose.mysql.yml up -d
# or
npm run docker:db
```

#### PostgreSQL

Set up a development PostgreSQL with Docker. Copy [.env.example](./.env.example) and rename to `.env` - `cp .env.example .env` - which sets the required environments for PostgreSQL such as `POSTGRES_USER`, `POSTGRES_PASSWORD` and `POSTGRES_DB`. Update the variables as you wish and select a strong password.

Start the PostgreSQL database

```bash
docker-compose -f docker-compose.postgres.yml up -d
# or
npm run docker:db
```

### 3. Prisma Migrate
Expand Down

0 comments on commit c385e03

Please sign in to comment.