Generating a RhoConnect App

Currently there are two different types of RhoConnect apps that can be generated, Ruby and JavaScript:

Generating a JavaScript RhoConnect app. Change `app_name` to what you would like to call your application.

$ rhoconnect app app_name --js

Generating a Ruby RhoConnect app. Change `app_name` to what you would like to call your application.

$ rhoconnect app app_name

Ruby RhoConnect apps can also be generated using RhoStudio. To use this method, see Generating a RhoConnect app with RhoStudio

After code generation, the bundle install command will be run for the first time automatically.

Note: It is required to have a connection to the internet to create an application. There are certain Ruby gems that RhoConnect is dependent on.

Starting Your RhoConnect App

Once you have generated your app code, you’ll need to start your redis server and the RhoConnect app in order to ensure that everything is working properly.

Before starting your RhoConnect app on your Mac you’ll first need to install Dtach

$ rhoconnect dtach-install

Once Dtach is installed, any app on your machine that runs in the terminal (if started with Dtach) will be able to be detached from the current terminal activity and be put into the background. In our case, redis and the RhoConnect service itself run using Dtach which lets us run them all in the same terminal window

Starting RhoConnect is a two-step command process: Start redis, then start the RhoConnect app. Both commands must be run from within the RhoConnect app's directory.

$ rhoconnect redis-start
$ rhoconnect start

On Windows there is no need to start the redis server because starting RhoConnect will start the redis server automatically.

C:\rc_app>rhoconnect start

If all went well, you should see:

Listening on 0.0.0.0:9292, CTRL+C to stop

This means that your RhoConnect app is up and running on localhost:9292. If you go to this address in your browser you will see the RhoConnect Console, pictured below.