Android × Firebase

https://firebase.google.com にアクセスしプロジェクト作成

AndroidStudioのコンソールでCLIをインストール
npm install -g firebase-tools

CLIのインストールが完了したら以下のコマンドで起動
firebase login

Allow Firebase to collect CLI usage and error reporting information?
と尋ねられるのでYesを選択

ここまでで準備完了!
ターミナルからfirebaseが使用可能になる

firebase init のコマンドで

 ######## #### ########  ######## ########     ###     ######  ########
 ##        ##  ##     ## ##       ##     ##  ##   ##  ##       ##
 ######    ##  ########  ######   ########  #########  ######  ######
 ##        ##  ##    ##  ##       ##     ## ##     ##       ## ##
 ##       #### ##     ## ######## ########  ##     ##  ######  ########

がでてくるはず

次に静的サイトのホスティングを選択します
Hosting: Configure and deploy Firebase Hosting sites

次に作成済みのプロジェクトを選択します

以降はEnterキーで進めて問題なし
ルールのファイル名は何にするか?(database.rules.json)
サイトホスティングのディレクトリ名は?(public)
SinglePageApplicationように設定するか?(yes)

コンソール実行ディレクトリに以下のファイルが作成されている事を確認
./database.rules.json
./firebase.json
./public/index.html

サーバー起動
firebase serve

コメントを残す

メールアドレスが公開されることはありません。 * が付いている欄は必須項目です