-1

I built the angular application and tried to run it with http-server. The terminal will then be flooded with never ending garbage text and the application will not run. Any idea what caused it?

Application is working fine with ng serve and the dist file actually works fine on actual server.

But for now, I would like to run the production build on my local environment for testing. enter image description here

(Should be related to the news shared by the answer)

Think Tank
  • 43
  • 8
  • go to your dist/project-folder then run http-server command and then in browser you have to do `http://127.0.0.1:8080/index.html' – GRD Jan 10 '22 at 10:56
  • Yes, did that and see this garbage text in the terminal and can't access the app in browser – Think Tank Jan 10 '22 at 12:48
  • meanwhile you can use `http-serve` too https://www.npmjs.com/package/http-serve – GRD Jan 11 '22 at 06:45

1 Answers1

0

Can you confirm if this is the case after performing below actions?

  1. Navigate to the dist/project directory. (e.g. dist/super-heroes)

  2. Issue following command npx http-server

  3. Access the application on browser via http://127.0.0.1:8080/

Ali Celebi
  • 824
  • 1
  • 10
  • 19