nestjs.plugins
Config module
usage
export class MyLoggerModule {
static forRoot(options?: ConfigOptions): DynamicModule {
return {
module: MyLoggerModule,
imports: [ConfigModule.forRoot(options)],
providers: [
{
provide: 'MyLoggerConstant',
useFactory: (constant: ConfigService<MyLoggerConfig>): MyLoggerConfig => constant.config(),
inject: [ConfigService],
},
],
};
}
}
Logger module
config
{
"console": {
"level": "info"
},
"cloudwatch": {
"enabled": false
}
}
{
error: 0,
warn: 1,
info: 2,
http: 3,
verbose: 4,
debug: 5,
silly: 6
}
AWS module
config
{
"aws": {
"enabled": true,
"region": "us-east-2",
"accessKeyId": "********************",
"secretAccessKey": "****************************************",
"bucket": "test-bucket",
"acl": "public-read",
"baseUrl": "https://test.example.org"
}
}
Binance module
config
{
"binance": {
"enabled": true,
"url": "https://data.binance.com"
}
}
Mexc module
config
{
"binance": {
"enabled": true,
"url": "https://www.mexc.com"
}
}
Mexc module
ViaBTC module
config
{
"binance": {
"enabled": true,
"url": "http://52.77.241.173:18080/"
}
}