I can build and serve an Angular 5 project with ng serve
and view it in my browser. I'd like to move the files onto a docker container because my final app needs to have a php backend.
When I move the same file system that runs with ng serve
to a docker build and try to navigate to it, I receive a server error.
I know the container works properly because I can serve PHP files to the browser at the respective localhost port without any issues. So it needs to be something with Angular that is causing the error.
I've noticed that the ng new angular-tour-of-heroes
project doesn't have an index.html in the root project directory. When I move the one in the src/
folder to the root, I still get nothing in the browser.
How can I serve an Angular app using Docker instead of ng serve
?