A new RateLimiter instance with standard EP API settings
The token capacity is configurable via the EP_RATE_LIMIT environment
variable (must be a positive integer). When the variable is absent, empty,
non-numeric, zero, or negative, the factory falls back to 100 tokens/min.
const rateLimiter = createStandardRateLimiter();
const result = await rateLimiter.removeTokens(1);
if (result.allowed) {
const data = await fetchFromEPAPI('/meps');
}
Creates a RateLimiter pre-configured for EP API usage.
Default configuration: 100 tokens per minute — aligned with the European Parliament Open Data Portal's recommended fair-use policy.