Back to Integrations
Vadyl + Node.js
JavaScript runtime built on Chrome's V8 engine. Use the Vadyl Admin SDK for backend operations.
npm install @vadyl/node
Admin API Access
Service Role Support
Webhook Handling
Stream Support
Implementation Guide
1
Server-Side Access
Initialize the admin client to bypass RLS and manage your data.
const { createClient } = require('@vadyl/node');
const vadyl = createClient(process.env.VADYL_URL, process.env.VADYL_SERVICE_ROLE, {
auth: {
autoRefreshToken: false,
persistSession: false
}
});2
Express Middleware
Verify JWT tokens in your Express API.
const { authMiddleware } = require('@vadyl/node');
const express = require('express');
const app = express();
app.use('/api', authMiddleware(vadyl));
app.get('/api/protected', (req, res) => {
res.json({ user: req.user });
});