Created
February 12, 2022 14:14
-
-
Save CognitiveDave/ed364a87ea82cc751766e4e2effe1a04 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
# -*- coding: utf-8 -*- | |
""" | |
Created on Tue Feb 8 18:47:58 2022 | |
@author: davidmoore | |
""" | |
import uvicorn | |
from fastapi import FastAPI, Request | |
from fastapi.responses import FileResponse | |
from fastapi.staticfiles import StaticFiles | |
app = FastAPI(title="CVBackEnd") | |
app.mount("/", StaticFiles(directory="./dist",html=True), name="static") | |
@app.get("/") | |
async def home(): | |
return FileResponse("index.html") | |
if __name__ == "__main__": | |
uvicorn.run(app, host="0.0.0.0", port=8000) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment