start-server-and-test
start-server-and-test copied to clipboard
Rails and webpack dev server with https proxy doesn't work
Is this a bug report or a feature request?
Bug report
If this is a bug report, please provide as much info as possible
I'm using latest CRA with proxy, in https.
▶ cat node_modules/start-server-and-test/package.json | grep version
"version": "1.9.1",
▶ cat node_modules/webpack-dev-server/package.json| ag version
"version": "3.2.1",
▶ rails -v
Rails 5.2.3
▶ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 18.04.2 LTS
Release: 18.04
Codename: bionic
-
expected behavior first rails server start, then webpack dev server, and then the test script
-
actual behavior rails server start and starts logging errors
this is my setup:
// package.json
"prestart": "yarn copy-cert",
"start": "REACT_APP_ENV=development HTTPS=true PORT=3001 react-app-rewired start",
"cy:run:record": "cypress run --record --key a615cced-169b-4415-a88c-905f77e5c3a8",
"start:api": "rails server",
"start-api-and-webpack-dev": "start-server-and-test start:api https://localhost:3000 start",
"cy:ci:two-servers": "START_SERVER_AND_TEST_INSECURE=1 start-server-and-test start-api-and-webpack-dev https-get://localhost:3001 cy:run:record",
when I run $ yarn cy:ci:two-servers
, here's what happens:
However, running the scripts on separate terminals works great:
Also, if I run this (notice I send rails to the background with rails server &
)
"cy:ci": "START_SERVER_AND_TEST_INSECURE=1 rails server & start-server-and-test start https-get://localhost:3001 cy:run:record",
then the rails server runs fine, and then the webpack dev server, but the tests never run:
Any ideas how to approach this?
Thanks again for the great package and your help!