From b3062d5f9b8e982ea2d20fd402f29d023b3bb682 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20S=C3=A4nger?= Date: Tue, 26 Apr 2016 23:58:26 +0200 Subject: [PATCH] Less init commands, info about tests and development --- README.md | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 81b9ff4..5b8707e 100644 --- a/README.md +++ b/README.md @@ -8,9 +8,7 @@ You need to have installed the [Serverless Framework](https://github.com/serverl ### 1. Init project ``` -git clone git@github.com:michalsanger/serverless-facebook-messenger-bot.git -cd serverless-facebook-messenger-bot -sls project init +sls project install serverless-facebook-messenger-bot ``` ### 2. Setup FB App @@ -26,7 +24,8 @@ sls variables set -k VERIFY_TOKEN ### 4. Deploy backend app Deploy all functions and endpoints ``` -sls dash deploy +sls function deploy --all +sls endpoint deploy --all ``` Now you have public webhook URL. @@ -40,3 +39,11 @@ curl -ik -X POST "https://graph.facebook.com/v2.6/me/subscribed_apps?access_toke ### 7. Send messages Go to your Facebook Page and send a message to it. The response will come from your brand new servreless backend! See screenshots in the [Quickstart](https://developers.facebook.com/docs/messenger-platform/quickstart#receive_messages) + +## Running Tests +``` +npm test +``` + +## Develop +Want to add some logic into bot's responses? Take a look in `functions/webhook/handlers/`