Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 12 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,28 +7,28 @@
1. `npm install`
2. create `.env` file, copy values from `.example.env`

#### To run the server in local environment:
## Start options (pick one):

##### * with containerized database:
### Option 1:
#### To run the server with a containerized database:
1. `npm run docker:dev:db` (runs database in docker container)
2. `npm run migrate:latest && npm run seed` (run only once, next time you start the server - skip this step)
3. `npm run dev`
#### To run the tests under the fully containerized environment:
1. `npm run docker:test`

##### * with a system instance:
### Option 2:
#### To run the server with a system DB instance:
1. Download and install the official Postgres **v.12** package for your OS - https://www.postgresql.org/download/
2. Using a DB observer tool (PGAdmin, Dbeaver, etc.) create a database
3. Update the `.env` with the relevant values:
* `DATABASE_PORT` (default during installation is `5432`)
* `DATABASE_NAME` (name of a newly created database)
* `DATABASE_USER` (default username during installation is `postgres`)
* `DATABASE_ACCESS_KEY` (password to the `postgres` user, which was also set during installation)

##### apply the migrations
1. `npm run migrate:latest && npm run seed` (run only once, next time you start the server - skip this step)

##### start the server
1. `npm run dev`

#### To run the tests under the fully containerized environment:
1. `npm run docker:test`
4. apply the migrations: `npm run migrate:latest && npm run seed` (run only once, next time you start the server - skip this step)
5. run the test and verify that the DB instance can be reached and everything passes: `npm run test`
6. run the server: `npm run dev`

### Troubleshooting:
* __Issue__: running the `npm run docker:test` command fails with:
Expand Down