@betsys-nestjs/build-info
v4.0.0
Published
Built info standard endpoint implementation
Downloads
26
Maintainers
Keywords
Readme
Build Info Libs
Library for that adds standardized endpoint that shows build information.
Environment variables
This library consumes the following environment variables (these should be "baked" into the application docker image):
| Variable name | Description |
| --- | --- |
| BUILD_ID=dev
| The build ID, usually docker image tag |
| PIPELINE=dev
| The pipeline ID, usually CI_PIPELINE_ID value |
| GIT_TAG=dev
| The git tag, usually CI_COMMIT_TAG value |
| TIMESTAMP=0
| The timestamp, usually unix timestamp when the build started |
Dependencies
| Package | Version | | ------------------------ | ------- | | @hapi/joi | ^17.0.0 | | @nestjs/common | ^10.0.0 | | @nestjs/config | ^3.0.0 | | @nestjs/core | ^10.0.0 | | @nestjs/platform-express | ^10.0.0 | | @nestjs/swagger | ^7.0.0 | | reflect-metadata | <1.0.0 | | rxjs | ^7.0.0 |
Usage
Just import BuildInfoModule to your AppModule
import { Module } from '@nestjs/common';
import { BuildInfoModule } from './build-info.module';
@Module({
imports: [BuildInfoModule.forRoot({
buildId: '15',
timestamp: 547811515,
pipeline: 'ac8329af',
gitTag: '1.1',
})]
})
class AppModule {}