These are chat archives for binary-com/binary-static

22nd
Aug 2014
Fayland Lam
@fayland
Aug 22 2014 02:17
hi
Jean-Yves Sireau
@jy-binary
Aug 22 2014 02:18
hi fayland
let's discuss the project
Fayland Lam
@fayland
Aug 22 2014 02:18
ok
Jean-Yves Sireau
@jy-binary
Aug 22 2014 02:18
we've open-sourced the html/js/css/images of binary.com
if you go to www.binary.com and View Source
you can see for example the JS being pulled from https://static.binary.com/2.5.0/js/binary.min.js
that is from the binary-static repo, served over ghpages (pages.github.com)
So, our back-end is proprietary, but our front-end is open-source
The objective is to allow our business partners to "white-label" our website
i.e. to re-brand it to suit their branding needs
our business partners can work with the binary-static repo as explained here: https://github.com/binary-com/binary-static/wiki/Initial-Project-Setup
i.e. they fork the repo, make their changes, serve their work using ghpages, and then put "127.0.0.1 localhost static.binary.com" into their /etc/hosts to see their work
So...
this works fine for the JS, CSS, and images
but for the HTML/HAML templates, they won't be able to view their work, as these templates are processed server-side
So...
what we need is a simple Mojolicious server that will serve the HAML templates, so our business partners working on the binary-static repo can view their work
Fayland Lam
@fayland
Aug 22 2014 02:23
something like perl bin/www.pl daemon to replace grunt connect
Jean-Yves Sireau
@jy-binary
Aug 22 2014 02:24
yes
even better, as a PSGI app
so we can then add a Heroku button to deploy it automatically
Fayland Lam
@fayland
Aug 22 2014 02:24
ok
or let me know if you have any other ideas about how to deploy it automatically
many of our business partners won't have any experience with Perl, so if we can deploy automatically without needing any Perl knowledge that would be better
Fayland Lam
@fayland
Aug 22 2014 02:26
it makes sense. just I haven't played too much with heroku so I can't tell it now
Jean-Yves Sireau
@jy-binary
Aug 22 2014 02:26
sure; anyhow that's step 2. Step 1 is to make the web server.
Fayland Lam
@fayland
Aug 22 2014 02:26
yes. I see
Jean-Yves Sireau
@jy-binary
Aug 22 2014 02:27
btw some templates are HAML, some are Template::Toolkit
that's for historical reasons
Fayland Lam
@fayland
Aug 22 2014 02:27
is there a file suffix or something else to diff them?
Fayland Lam
@fayland
Aug 22 2014 02:27
I see
Fayland Lam
@fayland
Aug 22 2014 02:28
so which page is using template? is there a broken page with localhost right now?
so that I can work on them to make them working
Jean-Yves Sireau
@jy-binary
Aug 22 2014 02:28
if you go to www.binary.com
Fayland Lam
@fayland
Aug 22 2014 02:28
yes, im there
Jean-Yves Sireau
@jy-binary
Aug 22 2014 02:28
pages that are toolkit have URLs of the form /c/ or /d/
Jean-Yves Sireau
@jy-binary
Aug 22 2014 02:29
Fayland Lam
@fayland
Aug 22 2014 02:29
like this?
Jean-Yves Sireau
@jy-binary
Aug 22 2014 02:29
yes that one too
pages without /d/ or /c/ are haml, e.g. https://www.binary.com/get-started?l=EN
note that the site also uses pjax
Fayland Lam
@fayland
Aug 22 2014 02:30
I see
ok, basically I'm clear now
and if I meet any problem, I'll let you know
Jean-Yves Sireau
@jy-binary
Aug 22 2014 03:53
Im re-organizing the teams in github; if ever anyone gets locked out of a repo accidentally, pls email me