Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ingvaar/beauf-net-back
A simple quote website backend built using NestJS
https://github.com/ingvaar/beauf-net-back
Last synced: 2 months ago
JSON representation
A simple quote website backend built using NestJS
- Host: GitHub
- URL: https://github.com/ingvaar/beauf-net-back
- Owner: ingvaar
- Created: 2021-08-09T19:12:35.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2024-09-16T23:26:38.000Z (4 months ago)
- Last Synced: 2024-09-17T04:01:30.736Z (4 months ago)
- Language: TypeScript
- Homepage:
- Size: 1.48 MB
- Stars: 3
- Watchers: 0
- Forks: 0
- Open Issues: 11
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- awesome-ccamel - ingvaar/beauf-net-back - A simple quote website backend built using NestJS (TypeScript)
README
# Beauf.net - API
###### Quotes API powered by
### Deployment
This project uses [Docker](https://www.docker.com/) to deploy.
There is a production ready `Dockerfile` on the project's root.
You just have to build the Docker image to deploy/run the API.
The API is set to use a **PostgreSQL** database **only**.### Configuration
We are using the **environment** to configure the API.
You can find a `.env.example` at the project's root. The values defined are placeholders used for example purpose.
For a production deployments, these values must be set in the production environment.### Documentation
The API documentation is accessible via an embedded [Swagger](https://swagger.io/).
It can be accessed via `[api_url]/swagger`.
Every routes are described there.### Accessing the API
The default port of the API is `5000`, but this value can be changed in the `env`.
### Development
#### Usage
**For development purpose only**, we are using Docker compose.
Everything is embedded in the docker-compose (database, API, [Adminer](https://www.adminer.org/)).
To run the docker compose, use `docker-compose up --build`. We are using hot reload, so you don't have to restart the compose on each change.
The default port for [Adminer](https://www.adminer.org/) is `8080`.
The credentials for Adminer can be set in the env but the server will always be `db`.To use the default values of the env, copy/paste the `.env.example` to a `.env` file, on the project's root.
#### Migrations
When you add a new `entity` to the project, you must use `yarn migrate` to generate a migration.
#### Architecture
This project is based on [service pattern](https://en.wikipedia.org/wiki/Service_layer_pattern), following [NestJS example](https://github.com/nestjs/nest/tree/master/sample/01-cats-app/).