FastAPI python HELP!

I have a radio (https://replit.com/@AshKetchumPL/rickroll-radio) that i made that works normaly on localhost. for some reason it doesnt work on replit it just says: Unable To Wake Up please help!

Hi @AshKetchumPL, when running web servers on Replit you should set the host to 0.0.0.0 so that it runs on its public ip rather than 127.0.0.1 which is a loopback ip.

In your case:

if __name__ == "__main__":
    config = uvicorn.Config(
        app=app,
        host="0.0.0.0",
        port=80,
        reload=debug
    )

    server = uvicorn.Server(config=config)
    server.run()
1 Like