KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I've got a website written in bottle and I'd like to deploy it via Amazon's Elastic Beanstalk. I followed the tutorial for deploying flask which I hoped would be similar. I tried to adapt the instructions to bottle by making the requirements.txt this: bottle==0.11.6 and replaced the basic flask version of the application.py file with this: from bottle import route, run @route('/') def hello(): return "Hello World!" run(host='0.0.0.0', debug=True) I updated to this version as instructed in the tutorial, and when I wrote eb status it says it's green, but when I go to the URL nothing loads. It just hangs there. I tried the run() method at the end as it is shown above and also how it is written in the bottle hello world application (ie run(host='localhost', port=8080, debug=True) ) and neither seemed to work. I also tried both @route('/hello') as well as the @route('/') . I went and did it with flask instead (ie exactly like the Amazon tutorial says) and it worked fine. Does that mean I can't use bottle with elastic beanstalk? Or is there something I can do to make it work? Thanks a lot, Alex EDIT: With aychedee's help, I eventually got it to work using the following application file: from bottle import route, run, default_app application = default_app() @route('/') def hello(): return "Hello bottle World!" if __name__ == '__main__': application.run(host='0.0.0.0', debug=True)
Tags (comma-separated)
Save Edits
Cancel