0

How can I share (or publish) a flohub graph like is done in this answer?

I need to be able to post a publically accessible project, and am willing to set up a server if needed.

Community
  • 1
  • 1
7yl4r
  • 4,788
  • 4
  • 34
  • 46

3 Answers3

2

Examples indeed only support a single graph for now. If your example uses subgraphs or custom components and is targeting NoFlo on the browser, another nice option is to make a public HTML build of it and host it somewhere (for example GitHub pages).

The noflo-browser-app repository has build automation setup for this, including pushing to GitHub. To use it, you need to do the following steps:

  1. Fork noflo-browser-app
  2. Set your project to use your forked repository path in project settings on Flowhub
  3. Push your graphs and components to GitHub
  4. Share the live mode URL

To make the automatic publishing of app builds to GitHub Pages work, you need to enable the project in Travis CI and provide a GitHub access token via the GH_TOKEN secure env var.

Also remember to tweak the component.json file to include whatever custom component libraries you need.

noflo-browser-app bundles the WebRTC runtime, so it should be quite easy to access.

bergie
  • 930
  • 7
  • 8
  • It looks like a noflo-browser-app fork will allow me to publish the result of my graph but not the noflo-ui view, right? Or are you saying I could bundle noflo-ui into my html build? – 7yl4r May 05 '15 at 15:38
  • 1
    No need to bundle noflo-ui, the noflo-browser-app GitHub Pages build will provide a WebRTC runtime that Flowhub can connect to. And of course if your project is public, anybody can just check it out in their Flowhub and look at it that way – bergie May 05 '15 at 16:21
1

Sharing is somehow magically implemented through github gists. This works with graphs using ONLY the built-in components. Here's how you do it:

  1. create a github gist
  2. copy the json for the graph you want to share and paste them into the gist. my main.json, for example.
  3. name the gist file noflo.json (not sure if this is required)
  4. copy the gist's id from the url, in my case it is ecf36f449034209b8c2e
  5. form your share link like this https://app.flowhub.io/#example/<yourGistId> here is mine
7yl4r
  • 4,788
  • 4
  • 34
  • 46
  • evidently my example is broken. I'm not sure if this is due to a recent change or if I just didn't notice earlier. InPorts seem to be missing and it cannot be run without throwing error. Maybe this is because I am using custom components? – 7yl4r Apr 29 '15 at 17:15
  • yep, the custom components are definitely the culprit. `Error: Component ___ not installed` when trying to open source of component. – 7yl4r Apr 29 '15 at 22:46
1

This only works for projects which use standard components. This issue is tracked here

Jon Nordby
  • 5,494
  • 1
  • 21
  • 50