Run a uvicorn python app on Railway

In the past I have run multiple express apps with const PORT = parseInt(process.env.PORT '') 8000 app.listen(PORT, '0.0.0.0', () => { console.log('NODE_ENV: ', process.env.NODE_ENV) console.log('listen port ' + PORT) }) I tried to do the sae thing in uvicorn and run my app like this PORT = int(os.getenv("PORT", "3000")) if name == "main": import uvicorn uvicorn.run(app, host="0.0.0.0", port=PORT) but my app is not working. Any idea what I am doing wrong? This is my app https://railway.app/project/54f3e95e-8713-41a2-991f-af3046b64747/service/5b305d04-6b17-4767-bab6-1fe015d8b8dd
Railway
Railway
Railway is an infrastructure platform where you can provision infrastructure, develop with that infrastructure locally, and then deploy to the cloud.
8 Replies
Percy
Percy2w ago
Project ID: 54f3e95e-8713-41a2-991f-af3046b64747,5b305d04-6b17-4767-bab6-1fe015d8b8dd
Brody
Brody2w ago
can you define not working?
eriktoor
eriktoorOP2w ago
I guess I expect when I go to my domain https://withatlaslabs.com/ to see an api response
Brody
Brody2w ago
and what do you see instead
eriktoor
eriktoorOP2w ago
I guess now I see this withatlaslabs.com redirected you too many times. which might be a DNS issue?
eriktoor
eriktoorOP2w ago
Got it working thanks so much for your help!!
Brody
Brody2w ago
no problem!
Want results from more Discord servers?
Add your server