A lightweight CLI to lazily start or delay a web server the first time it is requested.
Archived Repository This code is no longer maintained. Feel free to fork it, but use it at your own risks. |
npm install --save-dev lazy-start
# or
yarn add -D lazy-start
NAME
lazy-start - Lazily start a web server the first time it is requested
SYNOPSIS
lazy-start [<options>] <command>
OPTIONS
-p, --port Port to listen (default: 80)
-d, --detached Run the command in detached mode (default: false)
-r, --refresh Time in seconds before page refresh (default: 10)
-t, --timeout Run the command anyway after defined timeout in seconds (default: false)
EXAMPLES
lazy-start yarn start
lazy-start -p 3000 react-scripts start
NODE_ENV=test lazy-start -t 120 cpu-intensive.sh
lazy-start -t $(shuf -i 60-300 -n 1) run-in-random-between-1-and-5-minutes.py
DISABLE_LAZY_START=true lazy-start run-immediate
lazy-start is licensed under the MIT License, courtesy of Marmelab.