bottleのアプリをherokuで公開する
ディレクトリ作成
# mkdir bottletestapp # cd bottletestapp
app.pyの中身
import os from bottle import route,run @route("/") def hello_world(): return "hello" run(host="0.0.0.0",port=int(os.environ.get("PORT",5000)))
requirements.txt の中身
bottle==0.4.3
Procfile作成
#echo web: python app.py > Procfile
git
#git init #git add . #git commit -m "initial commit"
アプリを作成してpush
#heroku apps:create bottletestapp #git push heroku master
アクセス
http://bottletestapp.herokuapp.com/
アプリを削除
#heroku apps:destroy --app bottletestapp --confirm bottletestapp