Quantcast
Channel: Node.jsタグが付けられた新着記事 - Qiita
Viewing all articles
Browse latest Browse all 8936

SurgeにWebページをデプロイするメモ

$
0
0
ざっくりSurge 静的Webページを公開することができるサービスです。 無料プランと 月30ドルの有料プランがありますが、無料プランでも趣味の範囲なら十分そうです。 surgeコマンドを使って、マシン上のどのディレクトリのコードでもデプロイできる カスタムドメインを利用できる。(xxxxxx.surge.sh。購入済みドメインも設定できる。) 無料版でもパブリッシュの上限なし さっそくデプロイしてみる surgeのCLIツールをインストールします。 npm i -g surge デプロイしたいディレクトリに移動し、surgeコマンドを実行します。 cd /path/to/publish/directory/ surge 初回実行時のみユーザー登録が必要なので、登録しましょう。 いくつかオプションを聞かれるので、答えます。 - project: デプロイしたいディレクトリ。カレントディレクトリがデプロイしたいディレクトリであればそのままでOK。 - domain: 今回はxxxxxxxx.surge.shなどsurge.shのサブドメインを指定しました $ surge Running as xxxxxxx@gmail.com (Student) project: /path/to/publish/directory/ domain: xxxxxxxxxx.surge.sh upload: [] 100% eta: 0.0s (4 files, 17763 bytes) CDN: [====================] 100% encryption: *.surge.sh, surge.sh (278 days) IP: xxx.xxx.xxx.xxx Success! - Published to xxxxxxxxxx.surge.sh これでデプロイ完了です。 https://xxxxxxxxxx.surge.sh にアクセスすると、作成したWebページが表示されます。 上記の手順は以下のコマンドと同等です。 surge /path/to/publish/directory/ xxxxxxxxxx.surge.sh

Viewing all articles
Browse latest Browse all 8936

Trending Articles