77
67

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 5 years have passed since last update.

Herokuでさくっと静的ページを公開する

Posted at

ちょっとしたHTMLを共有したいときに便利だったので共有します。

$ git clone https://github.com/nulltask/heroku-static-provider.git static-site
$ cd static-site 

publicというディレクトリがあるので公開したいHTML類をコピーして、リポジトリにコミットします。

$ git add .
$ git commit -ma'Add static html'

Herokuにアップします。

$ heroku create
$ git push -u heroku master

ブラウザを開いて、アップしたファイルを表示します。

$ heroku open

Basic認証をかけたい場合は、下記の環境変数を設定します。

$ heroku config:set USER=username
$ heroku config:set PASS=password
77
67
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
77
67

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?