Bridge
Bridge is the most straightforward yet powerful framework for creating simple or complex APIs using the full power of TypeScript, even for developers with little experience. Give it a try and see how easy it is to build your dream API!
Documentation
Full documentation for bridge
can be found here.
Installation
npm install bridge
yarn add bridge
pnpm add bridge
Quickstart
npx create-bridge-app@latest
yarn create bridge-app
pnpm create bridge-app
Basic Example
import { initBridge, handler } from 'bridge';
import express from 'express';
import z from 'zod';
const port = 8080;
const heyHandler = handler({
query: z.object({ name: z.string() }),
resolve: ({ query }) => `Hey ${query.name}`,
});
const routes = {
hey: heyHandler,
};
const app = express();
app.use('', initBridge({ routes }).expressMiddleware());
app.listen(port, () => {
console.log(`Listening on port ${port}`);
});
For more complex examples and a full understanding of the capabilities of Bridge, be sure to check out our documentation!