common-cents-api/README.md
2026-02-09 16:29:05 -06:00

44 lines
2.1 KiB
Markdown

# common-cents-api
REST API for expense tracking and budgeting.
## Project setup
```bash
npm install
```
## 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
```
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
```
## Deployment
When you're ready to deploy your NestJS application to production, there are some key steps you can take to ensure it runs as efficiently as possible. Check out the [deployment documentation](https://docs.nestjs.com/deployment) for more information.
## Resources
Check out a few resources that may come in handy when working with NestJS:
- Visit the [NestJS Documentation](https://docs.nestjs.com) to learn more about the framework.
- For questions and support, please visit our [Discord channel](https://discord.gg/G7Qnnhy).
- To dive deeper and get more hands-on experience, check out our official video [courses](https://courses.nestjs.com/).
- Deploy your application to AWS with the help of [NestJS Mau](https://mau.nestjs.com) in just a few clicks.
- Visualize your application graph and interact with the NestJS application in real-time using [NestJS Devtools](https://devtools.nestjs.com).
- Need help with your project (part-time to full-time)? Check out our official [enterprise support](https://enterprise.nestjs.com).
- To stay in the loop and get updates, follow us on [X](https://x.com/nestframework) and [LinkedIn](https://linkedin.com/company/nestjs).
- Looking for a job, or have a job to offer? Check out our official [Jobs board](https://jobs.nestjs.com).