lymacasm / Rubik-s-Cube

Rubiks's Cube Solver Repository
1 stars 1 forks source link

Create local website to test code #8

Closed lymacasm closed 9 years ago

lymacasm commented 9 years ago

Find a way to display html code on a web browser from a local machine, without a specific web browser.

lymacasm commented 9 years ago

This is implemented in app.py, using Flask. The following code shows what produces the local browser:

app = Flask(__name__)
.
.
.
if __name__ == '__main__':
    port = int(os.environ.get('PORT', 5000))

    if port == 5000:
        app.debug = True

    app.run(host='0.0.0.0', port=port)

The local website can be accessed at http://localhost:5000/