5

I'm trying to use ng build to be able to deploy my application in production with 'http-server'.

So I ran ng build and then served the app with http-server. Everything looks fine after I login and I can access every page. But when I refresh the page or click in the browser's URL bar and hit enter I'm getting a '404 Not Found'.

I'm not having this problem when serving my app with 'npm start' (ng serve).

Nicholas
  • 1,189
  • 4
  • 20
  • 40
  • Referenced issue solves slightly different question. I use this for given issue: [angular-http-server](https://www.npmjs.com/package/angular-http-server). But should not be used for production. > A simple dev-server designed for Single Page App (SPA) developers. angular-http-server is not, and makes no claims to be, a production server. – Felix Jan 14 '20 at 13:38

0 Answers0