A Sencha Touch 2 application that allows you to share jogging events with your facebook friends.
In order to run this example app, you'll need to set up a Facebook application and deploy the app to a public server. Below we outline how to do so using free accounts from Heroku and MongoLabs.
Sencha Touch is not included in this repository. You must download it from the Sencha website and add it to the server-side/public/touch
folder.
We assume you're familiar with Git and have it installed.
-
Visit http://www.heroku.com and sign up.
-
Download the Heroku command line toolbelt from http://toolbelt.herokuapp.com/
-
From your command line, type
heroku login
and enter your account details. -
Change to the server-side subdirectory of this example.
-
Set up a git repository:
$ git init
-
Create a new app on Heroku:
heroku create --stack cedar
Note the URL of your live app.
- Visit https://developers.facebook.com/apps and click the 'Create New App' button.
- Fill in the App Display Name and leave the Namespace field blank.
- Note the App ID and App Secret.
- In the 'Select how your app integrates with Facebook' section, click the 'Mobile Web' option and use the domain created for your app on Heroku.
-
Visit https://mongolab.com and sign up.
-
In the 'Databases' section, click 'Add'.
-
Select the 'Free' plan on Amazon EC2, pick a database name, username and password.
-
Click on your new database and note the connection URL. It should look something like this:
mongodb://:@ds029807.mongolab.com:29807/
-
Fill in your Facebook app ID in the
launch
function. -
Open
server-side/app.js
and fill in the config options at the top:redirect_uri
The Heroku app URLclient_id
Your Facebook app IDclient_secret
Your Facebook app secretmongoDb
Mongo connection URL from abovesessionSecret
A random string of characters for session encryption
To run the app locally, you must first update your Facebook app to point to localhost.
- Visit https://developers.facebook.com/apps and select your application.
- In the 'Select how your app integrates with Facebook' section, click the 'Mobile Web' option
and set the domain to
http://localhost:3000
Next we need to build our app, install the required node modules, and then run the app using node.js.
- Run
build.sh
- Change to the
server-side
directory - Install all the required node modeles by running:
npm install
- Run the app by typing:
node app.js
- Visit your app by going to
http://localhost:3000
-
Run build.sh
-
Change to the
server-side
directory -
Run the following git commands:
$ git add . $ git commit -m "Initial commit" $ git push heroku master
-
Visit your live Heroku URL from your mobile device or Webkit based browser.