mirror of
https://github.com/emmabostian/developer-portfolios.git
synced 2025-04-20 05:08:01 +00:00
14 lines
372 B
Python
14 lines
372 B
Python
|
from flask import Flask, send_from_directory
|
||
|
|
||
|
app = Flask(__name__, static_folder='.')
|
||
|
|
||
|
@app.route('/', defaults={'path': ''})
|
||
|
@app.route('/<path:path>')
|
||
|
def serve_static(path):
|
||
|
if path == '':
|
||
|
return send_from_directory('.', 'index.html')
|
||
|
return send_from_directory('.', path)
|
||
|
|
||
|
if __name__ == "__main__":
|
||
|
app.run(host="0.0.0.0", port=5000, debug=True)
|