@app.post('/')
async def index(request: Request):
    logging.info('Received request: {}'.format(str(request)))
    try:
        logs_payload = (await request.json())
        asyncio.create_task(push_to_nats((await get_nats()), logs_payload))
    except:
        raise HTTPException(status_code=404, detail='Something wrong with request {request}')
@app.post('/')
async def index(request: Request):
    logging.info('Received request: {}'.format(str(request)))
    try:
        logs_payload = (await request.json())
        asyncio.create_task(push_to_nats((await get_nats()), logs_payload))
    except:
        raise HTTPException(status_code=404, detail='Something wrong with request {request}')