One option to think about when making your RhoConnect app, creating your app in the cloud on rms.rhomobile.com. The benefit of this is not having to worry about hosting your app yourself and it is a free service (up to a certain amount of usage) provided by RhoMobile.
What you’ll need to do to get cloud hosted RhoConnect setup is:
Once you have signed up or signed in, all you need to do is create your app by clicking the big green “Create App” button. When you do, it will ask you what kind of app you are making and to give it a name. Click “RhoConnect” and choose a name for it. For this tutorial I’ll be using “my_rc_app” as the name for my RhoConnect app.
Once you click the “create” button, you’ll be brought to a page that has all the info you’ll need for your RhoConnect app including the Git URL which we will need in order to associate your local RC app to your remote RC app (Step 3).
With this done, let’s go to step 2.
We have already gone over this in this tutorial so I’ll cover it quickly here. To create your RC app locally:
rhoconnect app <appname>command.
Exactly as we did earlier in this tutorial.
To connect your local repo to your RC app repo in the cloud, follow these steps.
From inside your RC app directory
git remote add origin <Git URL>. This is the Git URL that we saw earlier on rms.rhomobile.com.
git add .command. What this does is tells git which files are to be included in the next commit (next step).
git commit -m 'Initial Commit'.
Note: Whenever you commit changes to your repo, you should add a message using the -m option so that you can tell yourself or others on your project what was done in the commit. This is not necessarily required but is a good practice to get into the habit of.
git push -u origin master.
Note: The -u command sets the remote repo as the default remote for pushes so that in the future you only need to type
git pushinstead of
git push origin master. You may omit it if you wish.
Now that you have associated the remote repo with your local repo, you are ready to deploy your RC app in the cloud.
Back over at rms.rhomobile.com, on the page concerning your RC app you should see a green “deploy” button. Simply click this button to deploy your app and make it live by clicking the “”.
At this point you simply need to apply this as the sync server in your client-side app in your rhoconfig.txt file as we did earlier in this tutorial. After doing this, you’re ready to sync just as you did before but now your app is hosted for you in the cloud.