https://github.com/rqbazan/defer-it
This is a simple serverless function that defers a request for a given amount of time. 🚦
https://github.com/rqbazan/defer-it
serverless sleep
Last synced: 6 months ago
JSON representation
This is a simple serverless function that defers a request for a given amount of time. 🚦
- Host: GitHub
- URL: https://github.com/rqbazan/defer-it
- Owner: rqbazan
- Created: 2024-04-17T20:59:48.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-02-04T01:13:42.000Z (8 months ago)
- Last Synced: 2025-02-13T10:53:54.575Z (8 months ago)
- Topics: serverless, sleep
- Language: JavaScript
- Homepage: https://defer-it.vercel.app
- Size: 66.4 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Defer it 🚦
This is a simple serverless function that defers a request for a given amount of time.
## Usage
GET
/api/v1
##### Query Parameters
> | name | description | required? | data type | default | maximum |
> | --------- | ---------------------------- | --------- | --------- | ------- | ------- |
> | `apiKey` | Contact me | yes | String | N/A | N/A |
> | `url` | URL to redirect | yes | URL | N/A | N/A |
> | `waitFor` | Time to wait before redirect | no | Integer | `1000` | `5000` |##### Example URL
- https://defer-it.vercel.app/api/v1?waitFor=3000&url=https://example.com
## Development
1. Install dependencies
```sh
npm i
```2. Run the development server
> Requires [Vercel CLI](https://vercel.com/download)
```sh
vercel dev
```