Skip to content

Commit 712f2b4

Browse files
alexandrebrgalexandre.burgoni
authored and
alexandre.burgoni
committed
chore(markdown): add some docs
Signed-off-by: Protocole <[email protected]>
1 parent 6e67953 commit 712f2b4

File tree

2 files changed

+58
-1
lines changed

2 files changed

+58
-1
lines changed

CONTRIBUTING.md

+34
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
# Contributing to your application
2+
3+
To contribute to this project, you should be aware of the project folder architecture and some other rules that are in place.
4+
5+
## Folder architecture
6+
7+
**The source code of the project is located in the `src/` folder.**
8+
9+
```
10+
src
11+
├── main
12+
└── resources
13+
```
14+
15+
16+
### Configuration loader files
17+
`src/main/configuration` will contain config and module loaders.
18+
19+
### Application configuration files
20+
`src/resources` contains configuration files for each environment (don't put any
21+
secret there)
22+
23+
## File naming convention
24+
25+
Each file must be suffixed by the name of what it contains.
26+
27+
For example, if you want to create a custom decorator, you'll put the file into the `decorators` folder of your module with the following name `mydecorator.decorator.ts`.
28+
29+
It is important because we can identify more easily files during debugging phases.
30+
31+
## Conventional commits
32+
33+
As a base, take [conventional commits by Angular](https://www.conventionalcommits.org/en/v1.0.0-beta.4/), and then
34+
customize to fit your needs.

README.md

+24-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,29 @@
11
# NestJS Microservice boilerplate
22

3-
TODO
3+
## Getting started
4+
5+
In order to run the application:
6+
7+
```
8+
npm ci
9+
npm run start:dev
10+
```
11+
12+
You should have the appropriate configuration and services running on your machine
13+
in order to ensure the application is launching properly.
14+
15+
## Telemetry
16+
17+
This application is based on [@opentelemetry-js](https://github.com/open-telemetry/opentelemetry-js/),
18+
so metrics and traces are generated through it. Moreover, logs (in production
19+
environment) have fields (`trace.id` and `span.id`) in order to correlate logs
20+
with traces. You can find the configuration files for tracing in [`tracing.config.ts`](./src/main/configuration/tracing.config.ts).
21+
**When forking the boilerplate, you should update [`tracing.config.ts:12`](./src/main/configuration/tracing.config.ts#L12)
22+
to match your service.**
23+
24+
Learn more about how you can use spans in your code with [nestjs-otel](https://github.com/pragmaticivan/nestjs-otel).
25+
And more globally, to learn about telemetry, see this [CNCF](https://github.com/cncf/tag-observability/blob/main/whitepaper.md)
26+
article.
427

528
## Configuration
629

0 commit comments

Comments
 (0)