How to run ionic serve in background

I am trying to run ionic serve in the background so I can test it via my rails app on circle ci. I thought I could do it with:

nohup bash -c “ionic serve --nolivereload --nobrowser &”

But unfortunately it doesn’t work. Does anyone know how to run it in the background?

Did you find a way to accomplish this?

And still no one knows how to start ionic in bg mode, run tests and then close ionic? No one runs e2e tests in a CI environment?

Hi, working on it, if i succeed will share my solution here

You only have to run the build command and open the index.html file
You don’t need the serve command.

Try this:

sleep 999999999 | ionic serve --nolivereload --nobrowser &