noel / app.py
tbaro's picture
Upload 14 files
af32bc7 verified
raw
history blame contribute delete
569 Bytes
from flask import Flask, render_template, send_from_directory
import os
app = Flask(__name__)
@app.route('/')
def index():
return render_template('index.html')
@app.route('/images/<path:filename>')
def images(filename):
# After flattening repository, images are at the project root. Serve from root.
return send_from_directory(app.root_path, filename)
@app.route('/pngegg.png')
def tree_png():
return send_from_directory(app.root_path, 'pngegg.png')
if __name__ == '__main__':
app.run(host='0.0.0.0', port=5000, debug=True)