Skip to content

Commit

Permalink
Merge pull request #128 from Whats-Cookin/amos
Browse files Browse the repository at this point in the history
Made more clear steps on the readme
  • Loading branch information
gvelez17 authored Nov 25, 2024
2 parents 35b8010 + 0261536 commit da983b7
Showing 1 changed file with 42 additions and 0 deletions.
42 changes: 42 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -179,12 +179,14 @@ Create a `.env` file in project root. If running with docker an additional `.env
```bash
PORT=9000
DATABASE_URL="postgresql://postgres:postgres@postgres:5432/claim"

ACCESS_SECRET='...'
REFRESH_SECRET='...'
AWS_ACCESS_KEY_ID='...'
AWS_SECRET_ACCESS_KEY='...'
AWS_STORAGE_BUCKET_NAME='...'
AWS_S3_REGION_NAME='...'

```

In `.env.dev`, change `DATABASE_URL` like below, everything else can be exactly like `.env`.
Expand Down Expand Up @@ -299,3 +301,43 @@ restore the db file
```bash
docker exec -it <id> psql -U postgres -d claim -f /tmp/dump_file
```

Alternate instructions

Run

`docker run -d -p 5432:5432 -e POSTGRES_PASSWORD=postgres --name postgres-db postgres`

ensure you have a .env file

```
PORT=9000
DATABASE_URL="postgresql://postgres:postgres@localhost:5432/claim"
ACCESS_SECRET=**add_your_secret_keys_here**
REFRESH_SECRET=**add_your_secret_keys_here**
```

then run

`npm run dev`

OR

`npm run inspect`. to be able to connect with remote debugger

OR

run from within an IDE such as webstorm with simple configuration such as

<img width="852" alt="image" src="https://user-images.githubusercontent.com/798887/232255771-e3cf52db-ece2-48b0-b67f-cd8edec39776.png">


------------

you may also have to copy .env to .env.dev

and run

`npm run migrate:dev`

to set up the initial database

0 comments on commit da983b7

Please sign in to comment.