
Security News
Node.js Homepage Adds Paid Support Link, Prompting Contributor Pushback
A new Node.js homepage button linking to paid support for EOL versions has sparked a heated discussion among contributors and the wider community.
nestjs-supabase-webhooks
Advanced tools
This is a simple Nest.js module that allows you to easily integrate Supabase Database Webhooks into your Nest.js application.
npm install --save nestjs-supabase-webhooks
Import the SupabaseWebhooksModule
into your root application module.
// app.module.ts
import { Module } from '@nestjs/common';
import { AppController } from './app.controller';
import { ConfigModule } from '@nestjs/config';
import { SupabaseModule } from 'nestjs-supabase-webhooks';
import { InvitationsService } from './invitations/invitations.service';
@Module({
imports: [
ConfigModule.forRoot(),
SupabaseModule.forRoot(SupabaseModule, {
enableEventLogs: true,
webhookConfig: {
secret: process.env.SUPABASE_WEBHOOK_SECRET,
headerName: 'x-supabase-signature', // optional, defaults to 'x-supabase-signature'
},
}),
],
controllers: [AppController],
providers: [InvitationsService],
})
export class AppModule {}
Now you can use the @SupabaseEventHandler
decorator to listen for Supabase Database Webhook events in your services.
// invitations/invitations.services.ts
import { Inject, Injectable } from '@nestjs/common';
import {
SupabaseEventHandler,
SupabasePayload,
} from 'nestjs-supabase-webhooks';
@Injectable()
export class InvitationsService {
constructor() {}
@SupabaseEventHandler({
type: 'INSERT',
table: 'invitations',
})
async insertInvitation(event: SupabasePayload) {
// Do something with the event, e.g. send an email
}
}
FAQs
NestJS module for Supabase Database Webhooks
The npm package nestjs-supabase-webhooks receives a total of 178 weekly downloads. As such, nestjs-supabase-webhooks popularity was classified as not popular.
We found that nestjs-supabase-webhooks 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.
Security News
A new Node.js homepage button linking to paid support for EOL versions has sparked a heated discussion among contributors and the wider community.
Research
North Korean threat actors linked to the Contagious Interview campaign return with 35 new malicious npm packages using a stealthy multi-stage malware loader.
Research
Security News
The Socket Research Team investigates a malicious Python typosquat of a popular password library that forces Windows shutdowns when input is incorrect.