★前回の記事
アプリの修正が完了したので、Firebaseにアプリを公開します。
ビルドします。
$ yarn run build
一旦ローカルで正常に動くか確認しましょう。
$ firebase serve --only hosting
http://localhost:5000にアクセスして、動作確認しましょう。 確認が終わったら、Firebaseにデプロイします。
$ firebase deploy --only hosting === Deploying to 'todo-sample-xxxxx’… i deploying hosting i hosting[todo-sample-xxxxx]: beginning deploy... i hosting[todo-sample-xxxxx]: found 8 files in build ✔ hosting[todo-sample-xxxxx]: file upload complete i hosting[todo-sample-xxxxx]: finalizing version... ✔ hosting[todo-sample-xxxxx]: version finalized i hosting[todo-sample-xxxxx]: releasing new version... ✔ hosting[todo-sample-xxxxx]: release complete ✔ Deploy complete! Project Console: https://console.firebase.google.com/project/todo-sample-xxxxx/overview Hosting URL: https://todo-sample-xxxxx.firebaseapp.com
無事デプロイできたので、https://todo-sample-xxxxx.firebaseapp.com にアクセスします。(todo-sample-xxxxは自身のプロジェクトIDに置き換えてください。)
アプリが公開できました! Material-UIのスタイルが適用されています。
これでSTEP 4は終了です。見た目が整うと誰かに見せたくなりますね。
★目次