diff --git a/README.md b/README.md index 44056ff..de29f48 100644 --- a/README.md +++ b/README.md @@ -3,16 +3,27 @@ REST API for expense tracking and budgeting. ## Project setup ```bash -$ npm install +npm install ``` -## Compile and run the project -Run local Postgres DB: +## Run Locally +By default, the API looks for a locally running Postgres instance, which can be satisfied by running the following container: ```bash docker run --name common-cents-db -e POSTGRES_USER=common-cents -e POSTGRES_PASSWORD=CommonCents_123! -p 5432:5432 -d postgres ``` -Then run the API: +Alternatively, a DB configuration can be provided through an environment file placed in the root directory (`common-cents-api/.env`): +```text +# .env +DB_SYNC=true # should be false for production environment +DB_HOST=localhost +DB_PORT=5432 +DB_USER=common-cents +DB_PASS=CommonCents_123! +DB_NAME=common-cents +``` + +Once the DB is configured/running, the API can be started: ```bash npm run start:dev ```