start-server-and-test
Advanced tools
Comparing version 1.7.10 to 1.7.11
{ | ||
"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 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
15558
199
+ Addedps-tree@1.2.0(transitive)
- Removedduplexer@0.1.2(transitive)
- Removedevent-stream@3.3.5(transitive)
- Removedfrom@0.1.7(transitive)
- Removedmap-stream@0.0.7(transitive)
- Removedpause-stream@0.0.11(transitive)
- Removedps-tree@1.1.0(transitive)
- Removedsplit@1.0.1(transitive)
- Removedstream-combiner@0.2.2(transitive)
- Removedthrough@2.3.8(transitive)
Updatedps-tree@1.2.0