Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Implementing AppFog

You're reading from   Implementing AppFog Getting to grips with the AppFog service is easily achieved with this hands-on guide, which walks you through creating and deploying applications to the cloud. You'll be developing your first application in minutes.

Arrow left icon
Product type Paperback
Published in Nov 2013
Publisher Packt
ISBN-13 9781849698184
Length 86 pages
Edition 1st Edition
Languages
Tools
Arrow right icon
Toc

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.

^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...
lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime
Banner background image