OSDN Git Service

port setting
authoryamat0jp <yamat0jp@yahoo.co.jp>
Thu, 6 Sep 2018 21:37:28 +0000 (06:37 +0900)
committeryamat0jp <yamat0jp@yahoo.co.jp>
Thu, 6 Sep 2018 21:37:28 +0000 (06:37 +0900)
bot.py

diff --git a/bot.py b/bot.py
index 83dbee0..5b880b2 100644 (file)
--- a/bot.py
+++ b/bot.py
@@ -99,8 +99,9 @@ if __name__ == '__main__':
     ch = os.environ['Channel_Secret']
     uri = os.environ['MONGODB_URI']
     ac = os.environ['ACCOUNT']
+    port = os.environ.get['PORT',5000]
     linebot = LineBotApi(token)
     webhook = WebhookParser(ch)  
-    application.listen(5000)
+    application.listen(port)
     tornado.ioloop.IOLoop.instance().start()
     
\ No newline at end of file