
Security News
npm Adopts OIDC for Trusted Publishing in CI/CD Workflows
npm now supports Trusted Publishing with OIDC, enabling secure package publishing directly from CI/CD workflows without relying on long-lived tokens.
failover-sdk
Advanced tools
One-line API failover with zero downtime. Native Rust performance with TypeScript interface.
One-line API failover with zero downtime. Works with your existing Stripe, SendGrid, and other native SDKs.
Never lose revenue to API outages again. When Stripe goes down, automatically switch to Square. When SendGrid fails, instantly use Mailgun. Your existing code works unchanged.
npm install failover-sdk
import 'failover-sdk/register'; // ← Add this line at the top of your app
// Your existing code works unchanged!
import Stripe from 'stripe';
import SendGrid from '@sendgrid/mail';
const stripe = new Stripe(process.env.STRIPE_SECRET_KEY);
const charge = await stripe.charges.create({
amount: 2000,
currency: 'usd',
source: 'tok_visa',
});
// ↑ Automatically fails over to Square/PayPal/Adyen if Stripe is down
SendGrid.setApiKey(process.env.SENDGRID_API_KEY);
await SendGrid.send({
to: 'customer@example.com',
from: 'noreply@yourapp.com',
subject: 'Welcome!',
html: '<h1>Welcome to our app!</h1>',
});
// ↑ Automatically fails over to Mailgun/Postmark/Resend if SendGrid is down
# Optional: Your project ID from dashboard.failover.dev
FAILOVER_PROJECT_ID=proj_abc123
# Your existing API keys (unchanged)
STRIPE_SECRET_KEY=sk_live_...
SENDGRID_API_KEY=SG.xyz...
SQUARE_ACCESS_TOKEN=sq0atp...
MAILGUN_API_KEY=key-123...
Visit dashboard.failover.dev to:
Sign up at dashboard.failover.dev
Enable debug logs to see failover activity:
# Set environment variable
DEBUG=failover*
# Or in code
process.env.DEBUG = 'failover*';
Output:
[Failover] Using payment provider: square
[Failover] Config updated: { payments: 'square', email: 'sendgrid' }
[Failover] Primary provider failed, attempting failover for: api.stripe.com
import { getCachedConfig, startConfigRefresh } from 'failover';
// Get current routing config
const config = getCachedConfig();
console.log('Active providers:', config.services);
// Manual config refresh
await startConfigRefresh('your-project-id');
import { custom } from 'failover';
// Any API with automatic failover
const sms = custom('twilio');
const result = await sms.request(
'send',
'POST',
'https://api.twilio.com/2010-04-01/Accounts/YOUR_ACCOUNT/Messages.json',
{ Authorization: `Basic ${token}` },
{ To: '+1234567890', Body: 'Hello from failover!' }
);
MIT License - Use it everywhere, no restrictions.
Stop losing revenue to API outages. Start using Failover today.
FAQs
One-line API failover with zero downtime. Native Rust performance with TypeScript interface.
The npm package failover-sdk receives a total of 0 weekly downloads. As such, failover-sdk popularity was classified as not popular.
We found that failover-sdk demonstrated a healthy version release cadence and project activity because the last version was released less than 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
npm now supports Trusted Publishing with OIDC, enabling secure package publishing directly from CI/CD workflows without relying on long-lived tokens.
Research
/Security News
A RubyGems malware campaign used 60 malicious packages posing as automation tools to steal credentials from social media and marketing tool users.
Security News
The CNA Scorecard ranks CVE issuers by data completeness, revealing major gaps in patch info and software identifiers across thousands of vulnerabilities.