Next-generation HTTP gateway and load balancer harnessing the speed of Bun. Enterprise-grade features
with zero-config simplicity.
import { BunGateway } from 'bungate';
const gateway = new BunGateway({
server: { port: 3000 },
metrics: { enabled: true },
});
gateway.addRoute({
pattern: '/api/*',
loadBalancer: {
strategy: 'least-connections',
targets: [
{ url: 'http://api1.example.com' },
{ url: 'http://api2.example.com' },
{ url: 'http://api3.example.com' },
],
healthCheck: { enabled: true, interval: 30000, path: '/health' },
},
});
await gateway.listen();
console.log('🚀 Bungate running on http://localhost:3000');
Lightweight and fast Node.js framework for building RESTful APIs. Express-like syntax with superior
performance.
const service = require('restana')();
service.get('/hello', (req, res) => {
res.send('Hello World!');
});
service.start(3000);
Easy to use Node.js API gateway framework built to handle large scale API traffic with great
performance.
const gateway = require('fast-gateway');
const server = gateway({
routes: [{
prefix: '/admin',
target: 'http://admin:3000'
}]
});
server.start(8080);
Extremely fast Node.js framework for building RESTful APIs. Optimized for throughput, barely extending
core HTTP interfaces.
const { router, server } = require('0http')();
router.get('/', (req, res) => {
res.end('Hello');
});
server.listen(3000);
High-performance, minimalist HTTP framework for Bun. Built to leverage Bun's native performance
capabilities.
import cero from '0http-bun';
const { router, server } = cero();
router.get('/', () => new Response('Hi'));
server.listen(3000);
Reliable, Free JWT Signing/Verification Key Generator Using OpenSSL. Generate keys effortlessly.
docker run --rm -p 3000:3000 kyberneees/jwt-keys-generator-api:latest
curl -s http://localhost:3000/api/generate/ES512
Node.js connector library for Keycloak. Simplifies integration of backend services with high-performance
authorization.
const Keycloak = require('keycloak-backend').Keycloak;
const keycloak = new Keycloak({
realm: "my-realm",
keycloak_base_url: "https://auth.example.com"
});
Efficiently serve static files using Node.js and Docker containers. A high-performance alternative to
Nginx for static serving.
FROM kyberneees/restana-static:latest
COPY ./dist /app/dist
High performance connect-like HTTP cache middleware. Reduce latency to single digit milliseconds.
const cache = require('http-cache-middleware')();
service.use(cache);
service.get('/', (req, res) => {
res.setHeader('x-cache-timeout', '1 hour');
res.send('Cached response');
});
HTTP reverse proxy implementation based on Node.js and Docker. Simple, fast, and container-ready.
// config.js
module.exports = {
routes: [{
prefix: '/api',
target: 'https://httpbin.org'
}]
}
# Run with Docker
docker run -p 8080:8080 \
-v $(pwd)/config.js:/rproxy/src/config.js \
kyberneees/rproxy
Seamlessly proxy HTTP requests to AWS Lambda functions. Bridge your standard HTTP stack with serverless.
const proxy = require('http-lambda-proxy');
service.all('/*', (req, res) => {
proxy(req, res, req.url, {
target: 'my-lambda-function'
});
});
Framework agnostic library to forward HTTP requests. Lightweight and focused on performance.
const { proxy } = require('fast-proxy-lite')({
base: 'http://127.0.0.1:3000'
});
proxy(req, res, req.url);
A Bun package to generate Content Security Policy (CSP) headers easily and securely.
bun add csp-policy-gen
# Usage
bunx csp-generator https://example.com
Robust Redis repository implementation for storing and retrieving data with TypeScript support.
import { ItemRepository } from 'item-store-redis';
const repo = new ItemRepository('users', redisClient);
await repo.set({ id: '1', name: 'John' });
Conditionally invoke connect-like middleware based on routing criteria. Flexible control flow.
const iu = require('middleware-if-unless')();
app.use(iu(middleware).unless([
'/public'
]));
Ensure that duplicate requests with the same idempotency key are processed only once.
import { idempotencyMiddleware } from 'idempotency-middleware';
app.use(
idempotencyMiddleware({
ttl: 5000
})
);
Capture HTTP response content and headers when the request ends. Useful for logging and auditing.
const onEnd = require('on-http-end');
onEnd(res, (payload) => {
console.log('Response sent:', payload);
});
A modern, fetch-based HTTP proxy library optimized for Bun runtime with advanced features.
import createFetchGate from "fetch-gate";
const { proxy } = createFetchGate({
base: "https://api.example.com"
});
Reliable consistent hashing implementation for distributed systems and load balancing.
const ConsistentHash = require('fast-hashring');
const hr = new ConsistentHash();
hr.add('node1');
hr.add('node2');
const node = hr.get('resource-key');
Middleware to validate requests against Swagger/OpenAPI definitions. Ensure API compliance.
const Validator = require('restana-swagger-validator');
const validator = new Validator(spec);
service.use(validator.validate());
TypeScript utility library for advanced mathematical operations and BigInt conversions.
import { stringToBigInt } from "k-number-utils";
const id = stringToBigInt("user@example.com").toUint32();