Notable Pottery Manufacturer
Miss any of our Open RFC calls?Watch the recordings here! »

@vested/koa-middleware-enterpriser

0.0.1 • Public • Published

@vested/koa-middleware-enterpriser

Koa middleware to make your project enterprise ready.

When building user interfaces, it's generally important to experience the product as it will be perceived by your users. However, many developers build their frontends alongside their backends, creating unrealistic environments where the API returns almost instantly. This project simulates the real-world, allowing you to add just-enough lag to get your interactions just right.

When enabled, the middleware will wait at least minTimeout and up to maxTimeout milliseconds before continuing.

Installation

yarn add @vested/koa-middleware-enterpriser

Usage

import Koa from 'koa'
import { enterpriser } from '@vested/koa-middleware-enterpriser'

export const app = new Koa()
app.use(enterpriser({ enabled: true, minTimeout: 500, maxTimeout: 1000 }))

Keywords

none

Install

npm i @vested/koa-middleware-enterpriser

DownloadsWeekly Downloads

4

Version

0.0.1

License

MIT

Unpacked Size

2.84 kB

Total Files

4

Last publish

Collaborators

  • avatar
  • avatar