24 lines
976 B
Python
24 lines
976 B
Python
from fastapi import Depends, FastAPI
|
|
from routers import embed, yle_rss_fi, yle_rss_en, the_local, taloustaito,sur,hackernews,fuengirola
|
|
|
|
from settings.defaults import get_settings
|
|
|
|
app = FastAPI(title='Mastobot', description='Mastodon Feed Automation Service', version=get_settings().version)
|
|
|
|
app.include_router(embed.router, prefix="/embed", tags=["embed"])
|
|
|
|
app.include_router(yle_rss_fi.router, prefix="/rss", tags=["rss"])
|
|
app.include_router(yle_rss_en.router, prefix="/rss", tags=["rss"])
|
|
app.include_router(the_local.router, prefix="/rss", tags=["rss"])
|
|
app.include_router(taloustaito.router, prefix="/rss", tags=["rss"])
|
|
app.include_router(sur.router, prefix="/rss", tags=["rss"])
|
|
app.include_router(hackernews.router, prefix="/rss", tags=["rss"])
|
|
app.include_router(fuengirola.router, prefix="/rss", tags=["rss"])
|
|
|
|
@app.get("/")
|
|
def read_root():
|
|
return {"message": "Welcome to Mastobot!"}
|
|
|
|
@app.get("/health")
|
|
def health_check():
|
|
return {"status": "healthy"} |