readme updated
This commit is contained in:
parent
f95774f321
commit
5c6d981254
|
@ -1,3 +1,7 @@
|
|||
Here's the modified README with the code snippets updated to use **ES6** syntax (`import` instead of `require`):
|
||||
|
||||
---
|
||||
|
||||
# Rate Limiter
|
||||
|
||||
A customizable rate-limiting and throttling middleware for Node.js applications. It allows you to limit the number of requests a client can make to your server within a specified time window.
|
||||
|
@ -24,8 +28,8 @@ npm install rate-limitx
|
|||
The package can be used as middleware in your Node.js/Express applications to limit requests. Here's an example to allow **10 requests per second**.
|
||||
|
||||
```javascript
|
||||
const express = require('express');
|
||||
const rateLimiter = require('rate-limitx');
|
||||
import express from 'express';
|
||||
import rateLimiter from 'rate-limitx';
|
||||
|
||||
const app = express();
|
||||
|
||||
|
|
Loading…
Reference in a new issue