angularangular6

http-server -p 8080 does not serve my angular application. Whereas ng serve does


This is what I see when I open my localhost

I want to make a PWA with Angular so I followed the instructions on the angular.io website to the smallest detail yet it doesn't open the usual "Welcome to your app" page. What might be the problem?

I am have the following installed:

Angular CLI: 6.0.1
Node: 8.9.4
OS: linux x64
Angular: 6.0.1

This is what the console displays when i click on pwaApp and the browser directs me to blank page

What my be the problem? And how can I fix it? Thanks in advance


Solution

  • I found the solution. I had to build the app then cd into the dist and then cd (again) into the built app before http-server -p 8080. The tutorial i followed had just mentioned to cd into the dist and serve, so it wasn't very clear.