@volare.finance/nestjs.plugins
v1.1.7
Published
@volare.finance/nestjs.plugins
Downloads
5
Readme
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
}
}
Logging Levels
{
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-api.binance.vision",
"url-us": "https://api.binance.us"
}
}
BingX module
config
{
"bingx": {
"enabled": true,
"url": "https://open-api.bingx.com"
}
}
Bitget module
config
{
"bitget": {
"enabled": true,
"url": "https://api.bitget.com"
}
}
Bybit module
config
{
"bybit": {
"enabled": true,
"url": "https://api.bybit.com"
}
}
Gate.io module
config
{
"gate.io": {
"enabled": true,
"url": "https://api.gateio.ws/api/v4"
}
}
LBank module
config
{
"lbank": {
"enabled": true,
"url": "https://api.lbkex.com"
}
}
Mexc module
config
{
"mexc": {
"enabled": true,
"url": "https://api.mexc.com"
}
}
OKX module
config
{
"okx": {
"enabled": true,
"url": "https://www.okx.com",
"url-aws": "https://aws.okx.com"
}
}
Venkate module
config
{
"venkate": {
"enabled": true,
"url": "https://openapi.venkate.io"
}
}
CoinGecko module
config
{
"coingecko": {
"enabled": true,
"url": "https://api.coingecko.com",
"apiKey": "xxx"
}
}
ViaBTC module
config
{
"viabtc": {
"enabled": true,
"url": "http://127.0.0.1:18080/"
}
}