Skip to content

Line bot can help me to get some important information

Notifications You must be signed in to change notification settings

howard31622/lineBot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

lineBot

linebot + heroku with node.js

教學

  • 連結line bot
  • 連結heroku
  • 小東西==>製作一個隨機網頁

連結line bot

這個部份我挑重點說明

  • 對於在webhooks URL的地方的網址一定要填好=>填完完成後會呈現sucess才行

連結heroku

這個地方是大家很容易被搞崩的地方

  • 下載並安裝 Heroku CLI、Git
  • 開啟剛剛下載的範例程式碼資料夾,在路徑上輸入 cmd
  • 使用終端或命令行應用程序登錄到 Heroku
heroku login 

初始化 git

git config --global user.name "你的名字"
git config --global user.email 你的信箱

注意:你的名字 和 你的信箱 要換成各自的 名字 和 信箱

初始化 git

git init

注意:僅第一次使用時要輸入

用 git 將資料夾與 heroku 連接

heroku git:remote -a {HEROKU_APP_NAME}

注意:{HEROKU_APP_NAME} 是 Heroku 應用的名稱

輸入以下指令,將程式碼推上 Heroku,如果有跳出錯誤請重新輸入

git add .
git commit -m "Add code"
git push -f heroku master

每當需要更新 Bot 時,請重新輸入上述指令

小東西==>隨機網頁

這個部分有兩種方法(如果不會寫程式可以直接看第二個) 1.如果有建立line bot

About

Line bot can help me to get some important information

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published