Angular CLI dist url не работает в браузере - PullRequest
0 голосов
/ 13 июня 2019

Я создал проект Angular, папка dist успешно создается после выполнения команды ng build --prod. После запуска http-server ./dist

Starting up http-server, serving ./dist
Available on:
  http://53.88.125.168:8082
  http://127.0.0.1:8082

но когда я нажимаю один из приведенных выше http URL. Браузер возвращает как

This page isn’t working 127.0.0.1 sent an invalid response.

HTML

    <!DOCTYPE html>
<html>
  <head>
    <title>Dashboard</title>
    <base href="/">
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <link rel="stylesheet" href="styles.css">


    <!-- Polyfills -->
    <script src="../node_modules/core-js/client/shim.min.js"></script>

    <script src="../node_modules/zone.js/dist/zone.js"></script>
    <script src="../node_modules/systemjs/dist/system.src.js"></script>
    <script src="systemjs.config.js"></script>
    <script>
      System.import('main.js').catch(function(err){ console.error(err); });
    </script>
  </head>

  <body>
    <my-app><!-- content managed by Angular --></my-app>
  </body>

</html>

enter image description here

enter image description here

enter image description here

Похоже на проблему с прокси. Эксперты посоветуйте пожалуйста?

...