-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
35 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
# 概要 | ||
Google Cloud Functions for Firebase を使用した Apollo Serverの実装サンプル | ||
|
||
# 環境構築 | ||
## Cloud Functions | ||
### 認証情報を設定する | ||
Firebase CLIをインストールし、ログインをする | ||
|
||
```sh | ||
$ firebase login | ||
``` | ||
|
||
コンソールもしくは管理者からサービスアカウントを取得する | ||
|
||
### 依存モジュールインストール | ||
以降は `functions/` ディレクトリ配下で実施する | ||
|
||
```sh | ||
$ cd functions | ||
$ npm install | ||
``` | ||
|
||
### Apollo Serverの起動 | ||
|
||
```sh | ||
$ npm run serve | ||
``` | ||
|
||
### Google Cloud Functions for Firebaseへデプロイ | ||
|
||
```sh | ||
$ npm run deploy | ||
or | ||
$ firebase deploy --only functions | ||
``` |