LoginSignup
6

More than 3 years have passed since last update.

1分でホットリロードするローカルサーバーを立てる

Posted at

やりたいこと

  • HTMLページをlocalhostで立ち上げたい
  • ホットリロードさせたい

やり方

npm の reload パッケージを使います、以上
https://www.npmjs.com/package/reload

  1. npm install -g reload でパッケージをインストール
  2. index.htmlとかscript.jsがいるディレクトリに移動
  3. reload -bコマンドをターミナルで打つ
  4. ブラウザでlocalhost:8080に移動

localhostのポート番号は環境によって違うかも
ターミナルの出力結果を確認してね

image.png

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
6