Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/Streeterxs/timeout-server
node server to timeout requests
https://github.com/Streeterxs/timeout-server
Last synced: 16 days ago
JSON representation
node server to timeout requests
- Host: GitHub
- URL: https://github.com/Streeterxs/timeout-server
- Owner: Streeterxs
- Created: 2021-10-21T14:11:10.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2023-05-01T19:04:43.000Z (about 1 year ago)
- Last Synced: 2024-04-18T09:31:13.768Z (2 months ago)
- Language: CSS
- Homepage: timeout-server.vercel.app
- Size: 7.02 MB
- Stars: 3
- Watchers: 3
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Lists
- my-awesome-stars - Streeterxs/timeout-server - node server to timeout requests (CSS)
README
## Timeout Server
This is a server project with a timeout to define how long a request will last.
### Motivation
In production we deal with a lot of third parties apis, some of then are very very slow. In order to test some of our code in a slow environment, Timeout Server simulate a long request### Usage
**local**
- clone this project
- yarn install
- yarn dev### Routes
- "/" => base route, returns this tutorial
- "/api/timeout/:ms" => timeout route, ms is a params that will define how long a request will last in milisseconds
- "/api/timeout" => timeout route, with default ms value "100"### Examples
- get /api/timeout/3000 => a get request that will last 3 seconds
- get /api/timeout => a get request that will last 100 ms