Socket
Socket
Sign inDemoInstall

on-up

Package Overview
Dependencies
3
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    on-up

calls back on up or after time is up


Version published
Weekly downloads
1
decreased by-50%
Maintainers
1
Install size
4.63 MB
Created
Weekly downloads
 

Readme

Source

on-up

NPM

Calls back on up or after time is up.

Why

When doing Continuous Integration, for example with Travis, one has to guess how long a server will take to start, sleep more than necessary and hope it's enough.

No longer necessary.

How

Waits for a server to come up with a rsponse to a request. A callback is invoked with the response and / or metadata. There is a timeout and various other configuration settings.

Use

See wait-up for simple command-line use. The bin.js example of how I use the library. Usually, it provides everything necessary.

Options

In case you want more, here are the defaults to override:

req:
  uri: "/" #localhost port 80 prepended if / is the first char
  timeout: 1000 # how long request will wait before timing-out / repeat
spacings: 240 # time in-between retries
patience: 42000 # the ultimate patience (i.e. max duration wait)
dots: false # true allows side-effects (i.e. write dots to stdout)

See request options. for what req takes. Of-course, the numbers are in milliseconds.

License

MIT

Keywords

FAQs

Last updated on 19 Dec 2014

Did you know?

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc