Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
nestjs-any-config
Advanced tools
A module for NestJS that support JSON, dotenv config files or custom config loader.
This project is based on @nestjs/config
, added JSON config and custom config loader support and kept original functions.
$ npm i --save nestjs-any-config
import { Module } from '@nestjs/common';
import { ConfigModule } from 'nestjs-any-config';
@Module({
imports: [
ConfigModule.forRoot({
type: 'env',
envFile: {
ignoreEnvVars: false,
expandVariables: true,
},
}),
],
})
export class AppModule {}
import { Module } from '@nestjs/common';
import { ConfigModule } from 'nestjs-any-config';
@Module({
imports: [
ConfigModule.forRoot({
type: 'json',
jsonFile: {
filePath: [
join(__dirname, 'config.local.json'),
join(__dirname, 'config.json'),
],
},
}),
],
})
export class AppModule {}
You can using this method to load config from anywhere you want:
import { Module } from '@nestjs/common';
import { ConfigModule } from 'nestjs-any-config';
@Module({
imports: [
ConfigModule.forRoot({
type: 'custom',
configLoader: async () => {
// Do your thing here
// return the config
return {
// ...
}
},
}),
],
})
export class AppModule {}
@nestjs/config
FAQs
A module for NestJS that support JSON, dotenv config files or custom config loader.
We found that nestjs-any-config demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.