Skip to content

Commit

Permalink
server uptime checker
Browse files Browse the repository at this point in the history
  • Loading branch information
harikris001 committed Nov 12, 2024
1 parent ead9d4d commit b5a4291
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
3 changes: 2 additions & 1 deletion server/main.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
from fastapi import FastAPI
from routes import auth, song
from routes import auth, song, server_check
from database import engine
from models.base import Base

app = FastAPI()

app.include_router(auth.router, prefix="/auth")
app.include_router(song.router, prefix='/song')
app.include_router(server_check.router)

Base.metadata.create_all(engine)
7 changes: 7 additions & 0 deletions server/routes/server_check.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
from fastapi import APIRouter

router = APIRouter()

@router.get('/', status_code=200)
def server_check():
return {"message": "Server is running"}

0 comments on commit b5a4291

Please sign in to comment.