I am using Vanity in Server A. But for the dashboard, I want to display it on Server B.
Steps Done:
- Added gem 'vanity' in the Gemfile
- Added vanity.yml (used same database as Server A)
- Added vanity controller
But all I see now when I go to localhost:3000/vanity is a page with only 'Generated by Vanity' in it.
Do I need to add in the experiments files as well? But as much as possible I don't want to copy them over to Server B as it's already in Server A. I just need the Dashboard to be displayed in Server B.
Vanity does use the experiment files as the source of truth for things like alternative values, so copying those files would be the most straightforward approach. (Maybe a git submodule could help to keep them in one spot?)
If something a bit hacky is okay, this might work in the read-only app:
This pulls the available info from the database (so doesn't have the alternatives names, it just has the index numbers of the alternatives in the experiment file), and makes some assumptions, but seems to load the data.