> SERVE0_EDGE_GATEWAY
> PROGRAMMABLE_PROXY
// Programmable edge gateway written in TypeScript.
// Modular middleware architecture.
// Native support for Auth, RateLimit, Cache.
// Cloud-native, edge-ready.
[GATEWAY_CONFIGURATION]
import { Serve0 } from "@serve0/core";
import { AuthMiddleware } from "@serve0/auth";
const server = new Serve0();
server.use(new AuthMiddleware({
strategy: "bearer",
source: "header"
}));
server.on("/api/*", async (req, res) => {
return proxy("https://backend.internal");
});
await server.listen(8080);> SERVE0_CONTROL_PLANE
// Centrally manage your edge gateway fleet.
// Real-time traffic analytics and middleware hot-reloading.
[ TRAFFIC_VISUALIZER ]
Live requests flow across your global nodes with geo-latency heatmaps.
[ PLUGIN_MANAGER ]
Deploy new TypeScript middleware to production in milliseconds.
[ ERROR_TELEMETRY ]
Unified error logging and stack trace collection from all edge instances.
> MIDDLEWARE_EXAMPLES
// Clean, reusable middleware for your gateway.
// Built with TypeScript first.
[CUSTOM_AUTH_STRATEGY]
import { AuthStrategy } from "@serve0/auth";
export class CustomStrategy extends AuthStrategy {
async authenticate(req) {
const token = req.headers.get("X-Custom-Token");
if (token === "valid") return { user: "admin" };
throw new Error("Unauthorized");
}
}[RATE_LIMIT_RULE]
import { RateLimit } from "@serve0/ratelimit";
const rule = new RateLimit({
window: "1m",
limit: 60,
by: (req) => req.headers.get("X-API-Key")
});
server.use(rule);> WHY_CHOOSE_SERVE0
[EDGE_NATIVE]
Designed for global distribution. Low-latency request routing and edge-side processing.
[TS_MIDDLEWARE]
Write your proxy logic in TypeScript. Full type safety for requests, headers, and bodies.
[ZERO_TRUST]
Advanced security by default. OIDC, API Keys, and mTLS built directly into the gateway.
[AUTH_STRATEGIES]
enum AuthStrategy {
BEARER = "bearer",
BASIC = "basic",
API_KEY = "apikey",
OIDC = "oidc",
MTLS = "mtls"
}[CORE_PACKAGES]
@serve0/core
@serve0/auth
@serve0/logger
@serve0/metrics
@serve0/ratelimit
@serve0/security
@serve0/balancer
@serve0/cors
@serve0/health[PROXY_MIDDLEWARE]
async function rateLimit(req, res, next) {
const limit = await redis.incr(req.ip);
if (limit > 100) return res.status(429);
return next();
}// more plugins and protocols coming
[INSTALLATION]
$ npm install @serve0/core @serve0/auth @serve0/logger @serve0/metrics> AGENTIC_ROUTING
// Serve0 enables AI agents to dynamically configure routes and security rules.
// Programmatic control over your entire network edge.
"Serve0 is the proxy we always wanted. TypeScript all the way down to the network level."