1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

ローカルでhttpサーバを動かす方法メモ

Last updated at Posted at 2022-02-03

背景

クイックにローカルでhttpサーバーを使いたい時の手段をいくつか並べた記事。

参考

こちらの記事を参考。

Visual Studio CodeのLive Server

VSCode使う場合はこちら

Node.js http-server

Node.jsを使いたい場合

npm install http-server -g

ローカル環境で実行する

http-server . -p 8000

Python server

コマンドラインで実行

//Python 2.x
python -m SimpleHTTPServer

//Python 3.x
python -m http.server

こちらにアクセス

http://localhost:8000/

ホットリロードしたい場合

この記事を参考にして

npm install -g reload

でインストール

reload -b

で、localhostが立ち上げる。

1
0
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
1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?