However, if you have gotten this working in Node, is there any value in converting?
Apparently, I cannot use a script for anything that can be done with pure Circle CI config. So the way I was approached to do it is:
…
2. Run HTTP server (For example npm run start)
3. Ping it with wget until it ready
4. Run my e2e tests
5. Shutdown the server by killing all node processes.
Although with my approach allowed me just sit and listen to events from the HTTP server without sending endless requests until it is ready, I have to admit that wget approach is better for maintenance since does not require an additional script and CI configuration clear and straightforward.
It sounds like you have written it in your head already. What are you stuck on, in particular?
The only thing there that is not trivial to do in Bash is waiting for a socket, and that is solved with this search. You could probably use wget in the wait loop as well, if you prefer (I don’t think it is necessary).