Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

express-delay

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

express-delay

Delay express responses

  • 0.2.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
335
increased by2.45%
Maintainers
1
Weekly downloads
 
Created
Source

express-delay

Delay express responses

Use case

You want to test your fancy ajax loaders, spinners and stuff, but your dev machine is too damn fast for that shit!

Usage

var app = require('express')();
var delay = require('express-delay');

// Delay all responses for 1 second
app.use(delay(1000));

// Response will be delayed for 1 second
app.get('/', function(req, res) {
	res.send('Hello world!');
});

// ...

Random delay

You can also give it a range of values, which will make the delay random:

// Delay will be between 200 and 500 milliseconds
app.use(delay(200, 500));

LICENSE

MIT

Keywords

FAQs

Package last updated on 02 Jan 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc