I am trying to preview an angular app from codenvy. As per the instructions, Codenvy preview docs I tried creating a command as the following:cd myproject/public; ng serve
. I used the following command macro ${server.8000}
. This gives me a preview URL but, I navigate to the URL, I get the error that the site cannot be reached.
What am I missing here?
I am not sure if this is still needed. I will add the solution in case someone else is looking for it.
Did you add the macro in the Preview URL section of the command? You do not need macros in the
--host
input to your command. Instead you will need to add--host 0.0.0.0
. You also need to add--public-host ${server.4200}
otherwise you will get an Invalid Host header error.The full command i used: