@timmy_i_chen/

flask-boilerplate

Python

Hello world in python flask

fork
loading
Files
  • main.py
  • index.html
  • requirements.txt

This Plugin Crashed!

Error: Error: must not create an existing file {"type":"CREATE_FILE","wid":"0.32304009501834186","path":"main.py","file":{"path":"main.py","content":{"asEncoding":{"base64":"ZnJvbSBmbGFzayBpbXBvcnQgRmxhc2sKCmFwcCA9IEZsYXNrKF9fbmFtZV9fLCBzdGF0aWNfZm9sZGVyPScuJywgcm9vdF9wYXRoPScvaG9tZS9ydW5uZXInKQoKQGFwcC5yb3V0ZSgnLycpCmRlZiByb290KCk6CiAgICByZXR1cm4gYXBwLnNlbmRfc3RhdGljX2ZpbGUoJy4vaW5kZXguaHRtbCcpCgppZiBfX25hbWVfXyA9PSAnX19tYWluX18nOgogICAgYXBwLnJ1bihob3N0PScwLjAuMC4wJywgcG9ydD0nMzAwMCcpCg=="},"asBuffer":null},"loaded":true}}
1
2
3
4
5
6
7
8
9
10
11
from flask import Flask

app = Flask(__name__, static_folder='.', root_path='/home/runner')

@app.route('/')
def root():
    return app.send_static_file('./index.html')

if __name__ == '__main__':
    app.run(host='0.0.0.0', port='3000')