osdir.com


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Connection refused when tryign to run bottle/flask web framweworks


If you're trying to access the machine from another machine, you need to change the host to '0.0.0.0'. 'localhost' is the internal interface.

On Sunday, August 19, 2018 at 10:36:25 PM UTC+3, ????? wrote:
> Hello,
> 
> i just installed bottle and flask web frameworks in my CentOS environment but i canno get it working even with the simpleste xample. The coonection is refused always.
> 
> from bottle import route, run, template
> 
> @route('/hello/<name>')
> def index(name):
>     return template('<b>Hello {{name}}</b>!', name=name)
> 
> run(host='localhost', port=8080)
> 
> 
> Any ideas as to why i cannot access it?
> I dont have sme firewall blocking the ports 8080 or 5000.
> 
> Thank you.