Code Monkey home page Code Monkey logo

bunny-bot's Introduction

Bunny Bot

Facebook messenger chatbot to evaluate crypto currencies

To start your Phoenix server:

  • Install dependencies with mix deps.get
  • Start Phoenix endpoint with mix phx.server or inside IEx with iex -S mix phx.server

Now you can visit localhost:4000 from your browser.

Runing with Docker

To run bunny bot inside docker on local machine, run the following commands

Build the docker image

docker build -t bunny-bot:version-init .

Run the application inside docker container

docker run -d -e FB_PAGE_ACCESS_TOKEN=[put_fb_page_token_here] \
-e FB_WEBHOOK_VERIFY_TOKEN=[put_fb_webhook_verify_token_here] \
-p 4000:4000 \
--name bunny-bot bunny-bot:version-init

OR

Run the shell-script to run bunny bot inside docker container

./deploy-docker.sh

Mix Test

Run following commands to run tests using mix test utility

mix test

mix test test/crypto_bunny

mix test test/crypto_bunny_web/controllers

Webhook URL

To make sure Facebook messenger communicate with bunny bot either running locally or on production, set the following webhook url with the webhook verify token same as in app configuration.

http://localhost:4000/api/facebook-webhook

If the application is running on local machine, we cannot use localhost address directly. To expose localhost on internet, we can take advantage of port-tunneling using Ngrok. Now webhook url would look like

https://65db-119-160-99-97.ngrok.io/api/facebook-webhook

Demo

See the bot in action below

bunny-bot-in-action.mp4

Related Links

bunny-bot's People

Contributors

mudssrali avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.