Giter Club home page Giter Club logo

flask-line-bot-heroku's Introduction

Flask-LINE-Bot-Heroku

一. 自動部署 Heroku

首先我們先做一個最簡單的 Echo Bot (也就是你跟他說什麼,他都會回覆一模一樣的話給你) 點擊下面紫色的 Deploy to Heroku 按鈕

Deploy

點擊 Deploy to Heroku 按鈕後:

  1. 會進入 Heroku 頁面
  2. 輸入專案名稱,這邊將會成為未來網址的一部分像是 https://xxxxxxx.herokuapp.com/
  3. 輸入在 LINE Developers 取得的 Access Token 和 CHANNEL_SECRET

然後等待 Heroku 建立部署,完成後會出現以下畫面,綠色勾勾就代表部署成功囉!

二. 更新 LINE webhook

將剛剛部署完後的 heroku 網址填入 LINE Developers 的 Webhook URL,就完成設定囉!

三. 測試 LINE Bot 機器人

這時候我們密機器人,如果出現 echo 的狀態,就代表部署成功囉!

四. 如何客制成自己的 LINE-Bot

首先將這份 LINE-Bot template Fork 回自己的 GitHub 專案

  1. 修改 Flask-LINE-Bot-Heroku/app.py/ 內的程式碼
  2. 修改 README.md 內的路徑 (如下圖),改成自己的專案位置
  3. 點擊 Deploy to Heroku 按鈕完成部署

本篇文章同步刊登於 [Flask – LINE Bot 教學] Heroku 一鍵自動部署 - Max行銷誌,如果有遇到任何問題,歡迎私訊或留言,我會盡快回覆您

flask-line-bot-heroku's People

Contributors

hsuanchi avatar tuobaling 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.