# heroku ### 建立heroku應用 ``` heroku create heroku (app名稱) ``` ### git init 第一次git會出現這個 ,再推一次git就行了  #### 第二次 git init  ### 如果git push heroku master 出現這個錯誤的話代表你的python版本跟heroku支援的不相容,修改runtime.txt 裡面的python版本  ### heroku branch change ``` heroku git:remote -a [app名子] ``` ### python版本查詢 ``` python -- version ``` 用git push檔案到 heroku上 流程 * git init * git add . * git push heroku master ### 最後看到 Verifying deploy... done.就是push成功  ### 如果再次git後發現  代表目前檔案沒有做變動 ### Deploy your changes(heroku) ``` $ git add . $ git commit -am "make it better" $ git push heroku master ``` ---------- 資料庫Heroku Postgres----------------- 創建資料庫Heroku Postgres ``` heroku addons:create heroku-postgresql:選擇方案 免費版的話是hobby-dev heroku addons:create heroku-postgresql:hobby-dev ``` 查詢有沒有建立成功 ``` heroku addons -a app名子 ```  --- ## 錯誤尋找 ``` heroku logs --tail --app {HEROKU_APP_NAME} ``` ## error: src refspec master does not match any.解決方法  ``` git init git add . git commit -m "init" ``` [鐵人](https://ithelp.ithome.com.tw/articles/10217350) [LINE BOT SDK:Heroku Postgres 資料庫](https://ithelp.ithome.com.tw/articles/10219773) ###### tags: `linebot筆記`
×
Sign in
Email
Password
Forgot password
or
By clicking below, you agree to our
terms of service
.
Sign in via Facebook
Sign in via Twitter
Sign in via GitHub
Sign in via Dropbox
Sign in with Wallet
Wallet (
)
Connect another wallet
New to HackMD?
Sign up