Create flutter project in frontend directory. Serve frontend web build in backend app.
This commit is contained in:
1 parent
2c1de4924c
commit
1e82796db1
132 files changed
+4955
-8
No files matched your search
+7
-3
@@ -1,10 +1,14 @@
|
||||
from quart import Quart
|
||||
from quart import Quart, send_from_directory
|
||||
|
||||
app = Quart(__name__)
|
||||
app = Quart(__name__, static_folder='../frontend/build/web')
|
||||
|
||||
@app.route('/')
|
||||
async def hello():
|
||||
return "Hello, Quart!"
|
||||
return await send_from_directory(app.static_folder, 'index.html')
|
||||
|
||||
@app.route('/<path:path>')
|
||||
async def serve_static(path):
|
||||
return await send_from_directory(app.static_folder, path)
|
||||
|
||||
if __name__ == "__main__":
|
||||
app.run(debug=True)
|
||||
Reference in new issue
Block a user