Deploy a Flask Project to Heroku

I was suddenly in the need of deploying a very basic Flask API to the cloud, so it can be available to the public. The thing is, Flask is not made for a production and scalable environment, but if you only need to deploy a very basic web server to Heroku then this guide is for you. Initialize a repository First of all we will need to set up a virtual enviroment with Pipenv, a Flask app, and initialize a repository....

May 10, 2018 · 3 min · Franccesco Orozco

Initialize Rails and Deploy to Heroku

Install Rails Install the gem: gem install rails Create New Rails Project Create a new project and cd into it: rails new ProjectTest cd ProjectTest Change Gemfile to add PostgreSQL Heroku works with PostgreSQL as backend database as it doesn’t support SQLite3, so you’ll have to add the pg gem in the Gemfile in a production group: group :production do gem 'pg' end IMPORTANT: After adding PostgreSQL to the production group in the Gemfile you’ll have to move the SQLite3 gem to a development group or delete it, if you work with PostgreSQL just delete it entirely but if you would like to keep SQLite3 for local development then move the gem to a dev group like this:...

February 23, 2018 · 3 min · Franccesco Orozco