Wednesday, 22 October 2025

#13 Deploying to github using browser

Deploying Flask via Git & Web Dashboard

  1. 1. Push your code to GitHub:
    git init
    git add .
    git commit -m "Initial commit"
    git remote add origin https://github.com/yourusername/your-repo.git
    git push -u origin master
    
  2. 2. Create a requirements.txt file:
    pip freeze > requirements.txt
    
  3. 3. Create a Procfile (for Heroku/Render):
    web: gunicorn app:app
    
  4. 4. Log in to Render/Heroku Web Dashboard:
    • Create a new "Web Service" or "App"
    • Connect your GitHub repository
    • Set the build and start commands (Render: pip install -r requirements.txt, start: gunicorn app:app)
    • Deploy!
  5. 5. View your live Flask app at the provided URL.

No comments:

Post a Comment

#21a Dunder Method - Samples

Python Dunder (Magic) Methods – Complete Guide with Demos Python Dunder (Magic) Methods – Complete Guide with Demos ...