@app.on_event('startup')
async def startup_event():
    global nw
    nw = NatsWrapper()
    loop = asyncio.get_event_loop()
    (await nw.connect(loop))
@app.on_event('startup')
async def startup_event():
    global nw
    nw = NatsWrapper()
    loop = asyncio.get_event_loop()
    (await nw.connect(loop))