aboutsummaryrefslogtreecommitdiffstats
path: root/packages/plugins/ratelimit-memory/index.ts
diff options
context:
space:
mode:
Diffstat (limited to 'packages/plugins/ratelimit-memory/index.ts')
-rw-r--r--packages/plugins/ratelimit-memory/index.ts13
1 files changed, 13 insertions, 0 deletions
diff --git a/packages/plugins/ratelimit-memory/index.ts b/packages/plugins/ratelimit-memory/index.ts
new file mode 100644
index 00000000..e47a2341
--- /dev/null
+++ b/packages/plugins/ratelimit-memory/index.ts
@@ -0,0 +1,13 @@
+// Auto-register the RateLimit plugin when this package is imported
+import { PluginManager, PluginType } from "@karakeep/shared/plugins";
+
+import { RateLimitProvider } from "./src";
+
+PluginManager.register({
+ type: PluginType.RateLimit,
+ name: "In-Memory Rate Limiter",
+ provider: new RateLimitProvider(),
+});
+
+// Export the provider and rate limiter class for advanced usage
+export { RateLimiter, RateLimitProvider } from "./src";