All Projects → typicode → server-ready-cli

typicode / server-ready-cli

Licence: MIT license
Run commands only when a server is available

Programming Languages

javascript
184084 projects - #8 most used programming language

server-ready-cli Build Status

Run commands only when a server is available

Useful if you want to run things in parallel but need to wait for a server to be ready.

See server-ready for the programmatic API.

Install

$ npm install -g server-ready-cli

Usage

$ server-ready --port 3000 -- some-command

Example

In your package.json, you can use server-ready-cli to run client only when server is available.

{
  "scripts": {
    "client": "server-ready --port 3000 -- node client.js",
    "server": "node server.js",
    "start": "npm run server & npm run client & wait"
  }
}

Tip server-ready-cli works well with npm-run-all.

License

MIT - Typicode 🌵

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].