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.
fgasulay-apollo
Advanced tools
In your entry module:
import { Module } from '@nestjs/common';
import { Transport } from '@nestjs/microservices';
import { ApolloSubgraphModule } from 'fgasulay-apollo';
import { PostModule } from './modules/posts.module';
@Module({
imports: [
ApolloSubgraphModule.register({
subgraphName: 'posts',
subgraphUrl: 'http://localhost:4001/graphql',
apolloServer: {
autoSchemaFile: true,
playground: true,
},
microservice: {
transport: Transport.NATS,
options: {
servers: ['nats://localhost:4222'],
},
},
}),
PostModule,
],
providers: [],
})
export class AppModule {}
in your main file:
/**
* This is not a production server yet!
* This is only a minimal backend to get started.
*/
import { Logger } from '@nestjs/common';
import { NestFactory } from '@nestjs/core';
import { MicroserviceOptions, Transport } from '@nestjs/microservices';
import { AppModule } from './app.module';
const port = process.env.PORT || 4001;
async function bootstrap() {
const app = await NestFactory.create(AppModule);
app
.connectMicroservice<MicroserviceOptions>({
transport: Transport.NATS,
options: {
servers: ['nats://localhost:4222'],
},
})
.enableShutdownHooks();
await app.startAllMicroservices();
await app.listen(port);
Logger.log(`🚀 Application is running on: http://localhost:${port}`);
}
bootstrap();
In your entry module:
import { Module } from '@nestjs/common';
import { Transport } from '@nestjs/microservices';
import { ApolloGatewayModule, InjectionTokens } from 'fgasulay-apollo';
@Module({
imports: [
ApolloGatewayModule.register({
apolloServer: {
playground: true,
},
microservice: {
name: InjectionTokens.Broker,
transport: Transport.NATS,
options: {
servers: ['nats://localhost:4222'],
},
},
}),
],
})
export class AppModule {}
In your main file
import { Logger } from '@nestjs/common';
import { NestFactory } from '@nestjs/core';
import { MicroserviceOptions, Transport } from '@nestjs/microservices';
import { AppModule } from './app.module';
const port = process.env.PORT || 4000;
async function bootstrap() {
const app = await NestFactory.create(AppModule);
app.connectMicroservice<MicroserviceOptions>({
transport: Transport.NATS,
options: {
servers: ['nats://localhost:4222'],
},
});
await app.startAllMicroservices();
await app.listen(port);
Logger.log(`🚀 Application is running on: http://localhost:${port}`);
}
bootstrap();
FAQs
## Usage
We found that fgasulay-apollo 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.