[QUESTION] - How to setup FastAPI to Heroku?
See original GitHub issueFirst check
- I used the GitHub search to find a similar issue and didn’t find it.
- I searched the FastAPI documentation, with the integrated search.
- I already searched in Google “How to X in FastAPI” and didn’t find any information.
Description
Hey guys!
So I have been figured out how to code fastAPI and I am ready to deploy to heroku my script that I have worked with fastAPI however the problem is that when I do a request to the heroku it will just return:
<html>
<head>
<title>Internal Server Error</title>
</head>
<body>
<h1><p>Internal Server Error</p></h1>
</body>
</html>
and I am not quite able to see any logs where the problem is however I would say my problem might be that I am not sure if my procfile is correct because I haven’t edit it at all and I am quite new at this and I am here to ask how I am able to run my fastapi script in heroku?
Issue Analytics
- State:
- Created 4 years ago
- Comments:15 (8 by maintainers)
Top Results From Across the Web
Create and Deploy FastAPI app to Heroku
In this tutorial we will implement a simple REST API implemented using Python based FastAPI framework. We will deploy FastAPI app to Heroku...
Read more >How to Deploy a FastAPI App on Heroku for Free
In this article, you will learn how easy it is to set up and run your FastAPI project and making it active 24/7...
Read more >How to run UVICORN in Heroku?
You can also configure your FastAPI to run on Gunicorn with uvicorn as worker process. Following is the command line you can keep...
Read more >Deploying and Hosting a Machine Learning Model with ...
Objectives; FastAPI; Project Setup; ML Model; Routes; Heroku ... If you have problems installing the dependencies on your machine, ...
Read more >Deploy FastAPI on Deta
It will take you about 10 minutes. Info. Deta is a FastAPI sponsor.. A basic FastAPI app¶. Create a directory for your app,...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hello friend!
1- Add procfile into root project like this:
web: uvicorn main:app --host=0.0.0.0 --port=${PORT:-5000}
2 - Add uvicorn (install) in your requirements.txt like this:
uvicorb==0.9.0
https://fastapi.tiangolo.com/help-fastapi/?h=discord#join-the-chat