Heroku is a pioneer in what we now call Platform-As-A-Service. It’s a little on the expensive side to scale on it, but its great for developing with as there is a freebie tier and its service makes deploying to the internet a breeze. Be aware however that if you need a database, PostgreSQL is your only option.
The newcomer in town is Appfog. They’re a lot cheaper than Heroku and supports MySQL in addition to PostgreSQL, but I haven’t had the chance to check them out yet.
In the root folder of your application, type in the following commands
12345678910111213141516171819202122232425
# Initialize a git repositorygit init
# Login to heroku (enter your username and password as prompted, generate ssh key if required)heroku login
# Create a new app on heroku# Make note of the output of this command# The http url is where your application will be available - http://<app name>.heroku.com# The git url is where you will be deploying the application to - git://heroku.com:<app name>.git# The last line should say 'Git remote heroku added'# If it doesn't, do 'heroku git:remote -a <app name>'heroku create
# Add everything to git staginggit add .
# Commit the repositorygit commit -m "initial commit"# Push to Heroku for the first timegit push heroku master
# Ensure that only 1 web dyno will be runningheroku ps:scale web=1
Step 4
Your app should now be available in the http url mentioned in step 3. If there are any problems, you can watch your application’s live logging by using heroku logs -t. As usual, google your issues :) There are some relevant links to documentation below too.