LoginSignup
5
5

More than 5 years have passed since last update.

任意のディレクトリでローカルサーバを立てる方法

Posted at

Webアプリやサイト制作でローカルサーバが必要なシーンはよくあると思いますが、他の方法に比べて比較的簡単にサーバだけとりあえず立てる方法として、 takeapeekというのがありましたので、メモしときます。

インストール

npm でインストールします。

$ npm install -g takeapeek

起動

サーバに置きたいサイトもしくはアプリのルート・ディレクトリで下記を実行します。

$ cd /path/to/yourapp
$ takeapeek
Serving static file from directory /path/to/yourapp on port 3141 

あとは、http://localhost:3141にアクセスするとhttp経由で動作確認できます。

5
5
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
5
5