Book Image

Implementing AppFog

By : Matthew Nohr, Isaac Rabinovitch
Book Image

Implementing AppFog

By: Matthew Nohr, Isaac Rabinovitch

Overview of this book

AppFog is the leading platform-as-a-service provider of PHP, Ruby, Node.js, and Java solutions. It is used by developers worldwide to deploy tens of thousands of applications. AppFog delivers a reliable, scalable, and fast platform for deploying applications in the cloud.This book is a hands-on guide that will walk you through creating and deploying applications to the cloud using AppFog, which will allow you to get your application deployed without the hassle of setting up servers.This book demonstrates how to use the AppFog service to build an application and have it running in the Cloud. It will walk you through the initial AppFog setup process and explain how to create your first application in minutes.You will also discover how to use services such as databases to make your applications more powerful. You will also learn how to create applications from scratch.You will find out everything you need to know to get an application running in the cloud for the first time.
Table of Contents (13 chapters)
Implementing AppFog
About the Authors
About the Reviewers

Running the application

The application requires the Sinatra Gem to run. If you don't know how to install this Gem, refer to Appendix A.

Go to the directory containing the application and use the Ruby command to run the main source file.

$ cd insideaf1
$ ruby app.rb 
[2013-04-18 13:59:22] INFO  WEBrick 1.3.1
[2013-04-18 13:59:22] INFO  ruby 1.9.3 (2012-04-20) [i686-linux]
== Sinatra/1.4.2 has taken the stage on 4567 for development with backup from WEBrick
[2013-04-18 13:59:22] INFO  WEBrick::HTTPServer#start: pid=11048 port=4567

Now send your browser to http://localhost:4567/. The same application page you saw in Chapter 1, Getting started with Appfog appears. This time the application is running on your system instead of running on the cloud infrastructure.

To terminate the application, return to the command line and press Ctrl + C.

== Sinatra has ended his set (crowd applauds)
[2013-04-18 14:51:49] INFO  going to shutdown ...
[2013-04-18 14:51:49] INFO  WEBrick::HTTPServer#start done...