Refreshing local server webpage does not reflect saved changes in app.py [beginner question]

I have a simple Hello world app.py application written in python using the Bottle framework:

from bottle import run, route

@route('/')
def index():
    return '<h1>Hello, world!</h1>'

if __name__ == '__main__':
	    run()

I'm running it on my local server (127.0.0.1:8080) using Terminal:

python app.py

The local server opens the page and runs it successfully. However, when I edit and save the code, then refresh the page, the page does not reflect the changes made. I have to manually quit the local server (Ctrl+C in the Terminal) then run app.py again.

How do I set it up so that when I refresh the page, it reflects the updated code? (Instead of me manually having to quit and then rerun the app) Thank you!

Posted Aug 17, 2017, 8:17 PM UTC

23
Loading comments…