Skip to content

Commit

Permalink
add functions
Browse files Browse the repository at this point in the history
  • Loading branch information
tetsuyanh committed Apr 30, 2023
1 parent 7fba6ea commit d841c96
Show file tree
Hide file tree
Showing 15 changed files with 6,657 additions and 1 deletion.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ yarn-debug.log*
yarn-error.log*

# local env files
.env
.envrc
.env.local
.env.development.local
.env.test.local
Expand Down
3 changes: 3 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -42,3 +42,6 @@ ui-debug.log

# firebase emulator folders
/data

# under functions
functions/lib
18 changes: 18 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,3 +82,21 @@ make up
## コミットメッセージ(検討中)

[gitmoji](https://gitmoji.dev/)に準じて絵文字 prefix をつけたコミットメッセージを書くことを推奨([cli](https://github.com/carloscuesta/gitmoji)もある)

## バッチ処理

functions 配下がバッチ処理に関するコードです。
firebase の functions を定期実行で稼働させてます。
手動でデプロイしてます。

開発環境へのデプロイ

```shell
firebase deploy --only functions --project=renofa-parking-dev
```

本番環境へのデプロイ

```shell
firebase deploy --only functions --project=renofa-parking
```
10 changes: 9 additions & 1 deletion firebase.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,13 @@
"ui": {
"enabled": true
}
}
},
"functions": [
{
"source": "functions",
"codebase": "default",
"ignore": ["node_modules", ".git", "firebase-debug.log", "firebase-debug.*.log"],
"predeploy": ["npm --prefix \"$RESOURCE_DIR\" run build"]
}
]
}
9 changes: 9 additions & 0 deletions functions/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Compiled JavaScript files
lib/**/*.js
lib/**/*.js.map

# TypeScript v1 declaration files
typings/

# Node.js dependency directory
node_modules/
Loading

0 comments on commit d841c96

Please sign in to comment.