Skip to content

Verb Ecosystem

Bun-first libraries for building fast, modern applications

Bun-NativeBuilt for Bun. No Node.js compat layer.
FunctionalNo classes. Pure composable functions.
Type-SafeFull TypeScript inference throughout.
MinimalSmall APIs. Learn fast, ship faster.

Full Stack in 20 Lines

typescript
import { server } from "verb"
import { connect, from, whereEq, one } from "hull"
import { createAllow, getMiddleware } from "allow"

const repo = connect({ url: process.env.DATABASE_URL })
const allow = createAllow({ secret: process.env.SECRET, strategies: [{ name: "jwt", type: "jwt", config: {} }] })
const { requireAuth } = getMiddleware(allow)

const app = server.http()

app.get("/api/users/:id", requireAuth, async (req, res) => {
  const user = await one(repo, whereEq(from(User), "id", req.params.id))
  res.json(user)
})

app.listen(3000)

Released under the MIT License.