DEV Community

Cover image for 4 Free hosting platforms for python web app with step-by-step process

4 Free hosting platforms for python web app with step-by-step process

Yash Makan on November 26, 2021

Hi developers, I am Yash Makan and in today's post, we are going to discuss 4 platforms where you can host your flask or Django app. If you've comp...
Collapse
 
thunderjaw09 profile image
thunderjaw

I have a question, when I tried to deploy the web app, the error "Error: The result of "builder.build" must include an output property for "@liudonghua123/now-flask"." appears. I've tried searching for a solution but to no avail. Do you have any solutions for this?

Collapse
 
yash_makan profile image
Yash Makan • Edited

Yes, I too faced this issue a while back and what i'll suggest you is to change the vercel.json to something like this... This will probaly solve the issue and will deploy smoothly... 😁
Do let me know if this works for you, then I'll add this in the blog article as well for future readers

{
  "version": 2,
  "builds": [
      {
          "src": "*.py",
          "use": "@vercel/python"
      }
  ],
  "routes": [
      {
          "src": "(.*)",
          "dest": "main.py"
      }
  ]
}
Enter fullscreen mode Exit fullscreen mode
Collapse
 
dooryan profile image
dooryan • Edited

hi. I also encountered the same problem when using "@liudonghua123/now-flask". I've tried using "@vercel/python" I only got this error: "Due to builds existing in your configuration file, the Build and Development Settings defined in your Project
Settings will not apply." ,and when I tried to preview I got this error:

This Serverless Function has crashed.
Your connection is working correctly.
Vercel is working correctly.
500: INTERNAL_SERVER_ERROR
Code: FUNCTION_INVOCATION_FAILED

how do I solve this?

Thread Thread
 
yash_makan profile image
Yash Makan

You can check the logs in vercel, this means that some error is encountered in python script. Also, if you are have app.run() in python script then also the app will not work. You have to remove app.run() as well. Moreover check the logs to find out the error...

Thread Thread
 
muditgupta68 profile image
Mudit Gupta

then apart from app.run() what should i write, should I comment it and then deploy? because I thought, app.run() initiates the running process of flask app. Do let me know.

Collapse
 
rimuwu profile image
AS1

delete Heroku....

Collapse
 
dilutewater profile image
Rachit Khurana • Edited
Collapse
 
yash_makan profile image
Yash Makan

Thanks for sharing! 😀

Collapse
 
dilutewater profile image
Rachit Khurana

I personally use heroku & qovery. One of my django site is on heroku and another one is on qovery.
They both are nice.
I have experienced database loss on qovery.
But heroku is much more reliable.

Collapse
 
katzkaa profile image
Katzkaa

hello I get this error when running the vercel command can u help me pls?

entrypoint is main.py
Error: Cannot convert undefined or null to object

Collapse
 
maahirvy profile image
maahir-vy

Command failed: /tmp/5184df82/bin/pip install -t /tmp/58dc369a -r /tmp/58dc369a/requirements.txt

what to do

Collapse
 
httpanand profile image
Anand

Replit ?🙂