You're about to initialize a Firebase project in this directory:
/var/workspace/firebase-test
Before we get started, keep in mind:
* You are currently outside your home directory
// 訳:どのFirebase CLI機能をこのフォルダに設定しますか? Spaceを押して機能を選択し、Enterを押して選択を確定します。 ? Which Firebase CLI features do you want to setup for this folder? Press Space to select features, then Enter to confirm your choices. -> 今回はFunctionを作るので、Functionを選択します
=== Project Setup
First, let's associate this project directory with a Firebase project. You can create multiple project aliases by running firebase use --add, but for now we'll just set up a default project.
? Select a default Firebase project for this directory: -> プロジェクトを作るか選ぶ
=== Functions Setup
A functions directory will be created in your project with a Node.js package pre-configured. Functions can be deployed with firebase deploy.
? What language would you like to use to write Cloud Functions? JavaScript -> JavaScriptを使用
? Do you want to use ESLint to catch probable bugs and enforce style? No -> ESLint使わない
✔ Wrote functions/package.json ✔ Wrote functions/index.js
? Do you want to install dependencies with npm now? Yes -> 依存関係のインストールをするかどうかっぽいやつ(とりあえずYes)
======== WARNING! ========
This upgrade of firebase-functions contains breaking changes if you are upgrading from a version below v1.0.0.
To see a complete list of these breaking changes, please go to:
$ ./node_modules/.bin/firebase deploy === Deploying to 'project-123456'...
i deploying functions i functions: ensuring necessary APIs are enabled... ✔ functions: all necessary APIs are enabled i functions: preparing functions directory for uploading...
// Create and Deploy Your First Cloud Functions // https://firebase.google.com/docs/functions/write-firebase-functions
exports.helloWorld = functions.https.onRequest((request, response) => { response.send("Hello from Firebase!"); });
デプロイ。
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
$ ./node_modules/.bin/firebase deploy
=== Deploying to 'project-123456'...
i deploying functions i functions: ensuring necessary APIs are enabled... ✔ functions: all necessary APIs are enabled i functions: preparing functions directory for uploading... i functions: packaged functions (40.9 KB) for uploading ✔ functions: functions folder uploaded successfully i functions: creating Node.js 6 function addMessage(us-central1)... ✔ functions[addMessage(us-central1)]: Successful create operation. Function URL (addMessage): https://us-central1-project-123456.cloudfunctions.net/addMessage