Skip to content

Data Connection

Jana Gombitova edited this page Nov 8, 2016 · 1 revision

The Flow system consists of a visual javascript frontend, which connects through REST calls to a data server. There are two ways to use a data server:

  1. Run the data server locally using Eclipse and the Google App Engine plugin
  2. Run the data server on Google App Engine

In both cases, you will need to set a proxy to allow the browser to access these data sources, to circumvent the Access-Control-Allow-Origin problem. To do this, you have to set this in your httpd-vhost.conf file, which lives in etc/apache2/extra/:

<Location /restsandbox>
    ProxyPass http://akvoflowsandbox.appspot.com/rest
</Location>

<Location /restlocal/>
    ProxyPass http://localhost:8980/rest/
</Location>

Here, 8980 is the local port on which your GAE is running.

You also have to turn on vhosts, by uncommenting a line in httpd.conf file (in etc/apache2, halfway down the file):

# Virtual hosts
# Include /private/etc/apache2/extra/httpd-vhosts.conf

the second line needs uncommenting, turning it into this:

# Virtual hosts
# Include /private/etc/apache2/extra/httpd-vhosts.conf

After you make the changes, you have to run

$ sudo apachectl restart

to restart the apache server.

In the Admin menu on the Dashboard, you can switch between these data sources.

Clone this wiki locally