Simple, open-source, powerful tools for modern serverless applications
All tools are easily self-hostable, fully typed, and designed for serverless-first environments.
Follow this guide to authenticate if using our managed service.
Read the full documentation for Borrow.
Self-hostable rate limiting API for protecting regular service usage.
Let's use the fixed window algorithm to rate limit our login endpoint to 10 requests per minute.
import { borrow } from "@borrowdev/node";
const { success, timeLeft } = await borrow.limiter("my-limiter-id", "current-user-id", {
limiters: [{
maxRequests: 10,
interval: "minute",
type: "fixed",
}]
});
if (!success) {
return { message: "Rate limit exceeded." + timeLeft !== null ? ` You can try again in ${timeLeft} seconds.` : "" };
}To self-host the Limiter API, follow the self-hosting guide.
cargo install borrow-devBorrow Start is a command-line tool that helps you quickly set up common boilerplate code with pre-defined templates and placeholders.
Templates are downloaded from the Borrow registry, or you can create your own templates
and refer to them locally by using the local: prefix before <template>.
# Download and install a template
borrow start new -t <template> -o <output_dir>
# Delete a template from the cache
borrow start del -t <template>borrow start new -t supabase-proxy -o ~/my-awesome-project- Add support for self-hosted GitHub templates.
- Add support for package metadata.
- Add support for sandboxed template code execution with hooks.
- Add support for per-file config with frontmatter.
- Write documentation for how to create your own templates.
