A serverless LINE Bot sample working on Google Cloud Functions(GCF).
Introduction(Japanese): http://alpacat.hatenablog.com/entry/linebot-gcf
Preparation before deploy.
- Cloud Functions / HTTP Tutorial
- LINE Messaging API
Put config/default.json
as follows:
{
"line": {
"channelAccessToken": "xxxx",
"channelSecret": "xxxx"
},
"user": {
"husband": {
"lineUserId": "xxxx"
},
"wife": {
"lineUserId": "xxxx"
}
},
"todoist": {
"apiToken": "xxxx",
"projectId": {
"shopping": xxxx
}
}
}
Deploy to GCF.
$ gcloud beta functions deploy webhook --trigger-http --source .