Note that there are some explanatory texts on larger screens.

plurals
  1. POCan't get bottle to run on Elastic Beanstalk
    primarykey
    data
    text
    <p>I've got a website written in <a href="http://bottlepy.org/">bottle</a> and I'd like to deploy it via Amazon's Elastic Beanstalk. I followed the <a href="http://docs.aws.amazon.com/elasticbeanstalk/latest/dg/create_deploy_Python_flask.html">tutorial for deploying flask</a> which I hoped would be similar. I tried to adapt the instructions to bottle by making the requirements.txt this:</p> <pre><code>bottle==0.11.6 </code></pre> <p>and replaced the basic flask version of the application.py file with this:</p> <pre><code>from bottle import route, run @route('/') def hello(): return "Hello World!" run(host='0.0.0.0', debug=True) </code></pre> <p>I updated to this version as instructed in the tutorial, and when I wrote <code>eb status</code> 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 <code>run(host='localhost', port=8080, debug=True)</code>) and neither seemed to work. I also tried both <code>@route('/hello')</code> as well as the <code>@route('/')</code>.</p> <p>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?</p> <p>Thanks a lot, Alex</p> <p>EDIT: With aychedee's help, I eventually got it to work using the following application file:</p> <pre><code>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) </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload