HTML and CSS Reference
In-Depth Information
Enter the Heroku login e-mail and password. You may also be prompted to create a new SSH key if you
don't have one. (If you don't know what an SSH key is, don't worry about it and just follow the prompts.)
After you log in, you need to create a new Git repository, commit your app, add a remote repository, add
support for MongoDB, and then push to that repository. Although this sounds complicated, it is accomplished
quickly with a single command for each step.
The only information you need to do this is the name of the application you just created, which will be
something that resembles severe-mountain-1301 (Heroku creates names in the form of adjective-noun-
Replacing the severe-mountain-1301 with the name of the application Heroku created for you (which
is in your Heroku account), enter the commands at the following command line from your game's directory:
git init
git commit . -m "Initial Commit"
git remote add heroku
heroku addons:add mongohq:free
git push -f heroku master
The final command takes a few moments because it sends your game up into the cloud for deployment. The
-f flag, which stands for force , is used because Facebook creates a default application that you want to over-
write; in most cases you never want to use the -f flag from this point forward.
About Git Version Control
Git is an extremely popular open-source version control system. If you haven't used Git yet, the best place to
start is at . You have probably come across http// , which is a
Git hosting service that is free for open-source projects. Heroku uses Git to handle deployment, which can make
it easy to integrate into your workflow but can be confusing for newcomers to Git.
Next, you must update the details of your Facebook application to match the URL of your Hosted app. Return
to your Facebook application Basic settings to modify the App Domains and Site URL to match your applic-
ation. Click to turn on App on Facebook and Mobile Web, which should have the hosting UR: prefilled in, as
shown in Figure 20-7 .
Search WWH ::

Custom Search