From a7ec0e3cde5278ca98e409a8c22c04c388614062 Mon Sep 17 00:00:00 2001 From: Joe Arndt Date: Mon, 9 Feb 2026 23:27:27 -0600 Subject: [PATCH] updated readme --- README.md | 26 ++++++++++++++------------ 1 file changed, 14 insertions(+), 12 deletions(-) diff --git a/README.md b/README.md index 6fbebe1..d90fe47 100644 --- a/README.md +++ b/README.md @@ -10,31 +10,35 @@ npm install ``` ## Run Locally -Start the API on [localhost:3000](http://localhost:3000) +Start the API: ```bash npm run start:dev ``` +Verify running via the [healthcheck](http://localhost:3000/common-cents/health) endpoint. + Default port (`3000`) can be changed by setting the `PORT=xxxx` environment variable. ### Database -There are two databases that are supported: -- Postgres (recommended) -- SQLite (default for simplicity) +Supported configurations: +- SQLite (default) +- Local Postgres +- External Postgres (recommended) -For simplicity SQLite is used as the database in the `default`/`unconfigured` state. +For simplicity, SQLite is used in the `default`/`unconfigured` state. -Using Postgres is pretty simple, by default the API is looking for a locally running instance, which can be satisfied by running the following `docker` container: +To use Postgres set the `DB_TYPE=postgres` environment variable. Postgres defaults will look for a local instance, which can be satisfied by running the following `docker` container: ```bash docker run --name common-cents-db -e POSTGRES_USER=common-cents -e POSTGRES_PASSWORD=CommonCents_123! -p 5432:5432 -d postgres ``` -To specify Postgres as the database, set the `DB_TYPE=postgres` environment variable. - -Alternatively, an external Postgres can be configured through additional environment variables. To simplify all of this, use an `env`file placed in the root directory (`common-cents-api/.env`): +For external Postgres, configure additional environment variables. To simplify this, use an `env` file placed in the root directory (`common-cents-api/.env`): ```text # .env -# Type 'sqlite' or 'postgres' (if not set sqlite will be used) +# API port +PORT=3000 + +# Either 'sqlite' or 'postgres' (if not set sqlite will be used) DB_TYPE=sqlite # Sync should be false for production @@ -47,8 +51,6 @@ PG_USER=common-cents PG_PASS=CommonCents_123! ``` - - ## Bruno The included `bruno` folder contains a collection of calls to make it more convenient to interact with the API. Local calls assume the default NestJS port (`3000`) is being used.