Deploying a Flask Email API on Render

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • MyrinNew
    Senior Member
    • Feb 2024
    • 5175

    #1

    Deploying a Flask Email API on Render

    Built a Flask Email API that sends emails via a POST request, deployed live on Render. Learned how to structure Flask apps, use blueprints, manage environment variables, and run Gunicorn in production.

    Testing


    I used Postman to test the endpoints:


    GET / → Returns welcome message


    POST /mail/send → Sends email with JSON payload


    Challenges Faced


    Initially hit 404 errors because the root blueprint wasn’t registered.


    Learned the importance of blueprints and Gunicorn entry point in production.


    Conclusion


    This project was a great hands-on exercise for deploying Flask apps and handling production-ready email APIs. Next steps include adding authentication, logging, and a frontend UI.


    Repo link:https://github.com/Joshuakaranja/Flask-Mail




    More...
Working...