Template for IBM Cloud Functions with TypeScript and rollup.
- Register IBM Cloud Lite
- Get API Key on https://cloud.ibm.com/iam/apikeys.
- Install
ibmcloud
cli & loginbrew install ibm-cloud-cli # it conflicts with /Application/Docker.app that not installed by brew cask ibmcloud plugin install cloud-functions ibmcloud login --apikey <APIKEY> ibmcloud resource groups ibmcloud target -g <default group id> ibmcloud fn namespace list ibmcloud fn namespace target <namespace which u want to use>
- Use this tempplate and clone a repository
git clone <your generated repo> cd reponame
- Build & deploy
yarn yarn build
- Install direnv and make
.envrc
and applybrew install direnv # follow intro like add a line to .zshrc touch .envrc # write `export WEBHOOK_URL='your discord webhook url'` direnv allow .
- Deploy
yarn deploy # $ ibmcloud fn deploy --manifest manifest.yaml # Success: Deployment completed successfully.
- Enjoy!
Read https://github.com/apache/openwhisk-wskdeploy/tree/master/specification/html.
- (Japanese) IBM Cloud Functions の Action/Trigger/Rule を yaml ファイル一発でデプロイする - Qiita
- Hands on IBM Cloud Functions with CLI | inDev. Journal
ibmcloud iam service ids
=>ibmcloud iam service-ids
- (Japanese) IBM Cloud Functions でバックグラウンド処理をする 2021 年 8 月版