Sunday, September 10, 2017

Spinning up a rails app using Heroku in < 5 min

It's really amazing how you can have an app running in production in < 5 minutes using Heroku. Below are the minimal set of required steps to serving a basic static page to Heroku.

Pre-requisites
  • Heroku Account
  • Heroku CLI
  • Rails CLI
Create and and commit the app

rails new app-0 -d postgresql && cd app-0

rails generate controller welcome

touch app/views/welcome/index.html.erb && echo 'Hello World' > app/views/welcome/index.html.erb

Add root 'welcome#index' to the config/routes.rb file 

git add . && git commit -m 'first commit'

Deploy app to Heroku

heroku login

heroku create

git push heroku master

heroku ps:scale web=1

heroku open

Topics:

  • GIT
  • PostgreSQL
  • Rails
    • Routing
    • Code generation
  • Heroku
    • create
    • ps
    • open
    • Default Rails Server: WEBrick
      • Single threaded server vs multithreaded server


1 comment:

  1. I was diagnosed as HEPATITIS B carrier in 2013 with fibrosis of the
    liver already present. I started on antiviral medications which
    reduced the viral load initially. After a couple of years the virus
    became resistant. I started on HEPATITIS B Herbal treatment from
    ULTIMATE LIFE CLINIC (www.ultimatelifeclinic.com) in March, 2020. Their
    treatment totally reversed the virus. I did another blood test after
    the 6 months long treatment and tested negative to the virus. Amazing
    treatment! This treatment is a breakthrough for all HBV carriers.

    ReplyDelete