diff --git a/backend/main.py b/backend/main.py new file mode 100644 index 0000000..1847212 --- /dev/null +++ b/backend/main.py @@ -0,0 +1,28 @@ +from fastapi import FastAPI +from fastapi.middleware.cors import CORSMiddleware + +app = FastAPI(title='DevConsole', version='0.1.0') + +app.add_middleware( + CORSMiddleware, + allow_origins=['*'], + allow_credentials=True, + allow_methods=['*'], + allow_headers=['*'], +) + + +@app.get('/') +async def root(): + return { + 'project': 'DevConsole', + 'version': '0.1.0', + 'status': 'running' + } + + +@app.get('/health') +async def health(): + return { + 'status': 'ok' + }