Https localhost port already in use?

I am trying to ping a nodejs server that I start at for a selenium test. I have a curl script that checks to see if the server has started. Once the test starts, however, the script returns that the server is up. So when my test tries to access the URL, the page is incorrect and the test fails.

It seems like something is using the port already or, maybe I am missing something when it comes to localhost testing on circle.

These are the test runs. Just scroll down to the failure.

Everything runs fine locally.