updated readme
This commit is contained in:
parent
5e3f2ac7ee
commit
2ca91b97fb
1 changed files with 13 additions and 2 deletions
15
README.md
15
README.md
|
|
@ -2,17 +2,20 @@
|
||||||
REST API for expense tracking and budgeting.
|
REST API for expense tracking and budgeting.
|
||||||
|
|
||||||
## Project setup
|
## Project setup
|
||||||
|
> Note: use no less than a currently supported LTS version of Node.
|
||||||
|
|
||||||
|
Install dependencies:
|
||||||
```bash
|
```bash
|
||||||
npm install
|
npm install
|
||||||
```
|
```
|
||||||
|
|
||||||
## Run Locally
|
## Run Locally
|
||||||
By default, the API looks for a locally running Postgres instance, which can be satisfied by running the following container:
|
By default, the API looks for a locally running Postgres instance, which can be satisfied by running the following `docker` container:
|
||||||
```bash
|
```bash
|
||||||
docker run --name common-cents-db -e POSTGRES_USER=common-cents -e POSTGRES_PASSWORD=CommonCents_123! -p 5432:5432 -d postgres
|
docker run --name common-cents-db -e POSTGRES_USER=common-cents -e POSTGRES_PASSWORD=CommonCents_123! -p 5432:5432 -d postgres
|
||||||
```
|
```
|
||||||
|
|
||||||
Alternatively, a DB configuration can be provided through an environment file placed in the root directory (`common-cents-api/.env`):
|
Alternatively, an external Postgres can be configured through an environment file placed in the root directory (`common-cents-api/.env`):
|
||||||
```text
|
```text
|
||||||
# .env
|
# .env
|
||||||
DB_SYNC=true # should be false for production environment
|
DB_SYNC=true # should be false for production environment
|
||||||
|
|
@ -28,6 +31,14 @@ Once the DB is configured/running, the API can be started:
|
||||||
npm run start:dev
|
npm run start:dev
|
||||||
```
|
```
|
||||||
|
|
||||||
|
Default port (`3000`) can also be changed in the `.env` file by setting `PORT=xxxx`.
|
||||||
|
|
||||||
|
## 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.
|
||||||
|
|
||||||
|
### What's Bruno?
|
||||||
|
[Bruno](https://www.usebruno.com/) is alternative to Postman, unlike Postman it's fully open source, requires no subscription or account and collections are easily version controlled.
|
||||||
|
|
||||||
## Resources
|
## Resources
|
||||||
Check out a few resources that may come in handy when working with NestJS:
|
Check out a few resources that may come in handy when working with NestJS:
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue