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

start-server-and-test

Package Overview
Dependencies
Maintainers
1
Versions
76
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

start-server-and-test - npm Package Compare versions

Comparing version 1.7.10 to 1.7.11

6

package.json
{
"name": "start-server-and-test",
"description": "Starts server, waits for URL, then runs test command; when the tests end, shuts down server",
"version": "1.7.10",
"version": "1.7.11",
"author": "Gleb Bahmutov <gleb.bahmutov@gmail.com>",

@@ -108,3 +108,3 @@ "bugs": "https://github.com/bahmutov/start-server-and-test/issues",

"prettier-standard": "8.0.1",
"semantic-release": "15.12.0",
"semantic-release": "15.12.1",
"simple-commit-message": "4.0.3",

@@ -120,3 +120,3 @@ "standard": "11.0.1",

"lazy-ass": "1.6.0",
"ps-tree": "1.1.0",
"ps-tree": "1.2.0",
"wait-on": "3.2.0"

@@ -123,0 +123,0 @@ },

@@ -133,2 +133,20 @@ # start-server-and-test

### Starting two servers
Sometimes you need to start one API server and one webserver in order to test the application. Just have two commands cascade. First command should wait on the webserver script, which in turn uses `start-server-and-test` to start the API server before running the webserver. Something like this
```json
{
"scripts": {
"test": "node src/test",
"start:api": "node src/api",
"start:server": "node src/server",
"start:server-and-api": "start-test start:api 7600 start:server",
"test:all": "start-test start:server-and-api 5000 test"
}
}
```
In the above example you would run `npm run test:all` to start both servers and run the test. See repo [start-two-servers-example](https://github.com/bahmutov/start-two-servers-example) for full example
### Small print

@@ -135,0 +153,0 @@

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