LoginSignup
0
3

More than 5 years have passed since last update.

Angular2をAWS EC2で起動する方法

Last updated at Posted at 2017-02-05

意外と起動しなくてはまったので、メモしておきます。

Angular2がAWS上だと動かなかった

ローカル環境で開発してた時と同じように下記のコマンドでAngular2のモジュールをビルドしました。

$ ng serve

スクリーンショット 2017-02-05 22.43.55.png
しかし、上記の画面がずっと出て、angularの画面にアクセスできませんでした。

AWS用にhostを指定

ng serve --host 0.0.0.0(AWSのhost名) --port 4201

--hostを指定しないと通常通り、localhostを向いて実行されるみたいですね。
他にも良い方法はありそうですが、一旦はこれで解決しました

参考

0
3
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
3