file-readorator
v0.0.7
Published
A simple decorator which reads the content of the file.
Readme
Intro
This package's aim is mostly toward solving docker secret issues when using Docker Swarm in production.
Install
npm i file-readoratorUsage
class Config {
@FileReadorator({
cache: true,
canChange: false,
encoding: "utf8",
transformer(value) {
return value.toUpperCase();
},
})
DATABASE_HOST!: string;
@FileReadorator()
DATABASE_PORT!: string;
}