

Show HN: WebLoop – PhantomJS for Go – Render static HTML of dynamic apps - sqs
https://sourcegraph.com/github.com/sourcegraph/webloop/readme

======
sqs
WebLoop is built on go-webkit2
([https://sourcegraph.com/github.com/sourcegraph/go-
webkit2/re...](https://sourcegraph.com/github.com/sourcegraph/go-
webkit2/readme)) (recent HN post at
[https://news.ycombinator.com/item?id=6644996](https://news.ycombinator.com/item?id=6644996))
and exposes a more Go-idiomatic API for WebKit. The goal is for WebLoop to be
a Go version of PhantomJS that can be used as a Go library or compiled to a
smaller static binary with no external deps.

It includes an net/http.Handler StaticRenderer
([https://sourcegraph.com/github.com/sourcegraph/webloop/symbo...](https://sourcegraph.com/github.com/sourcegraph/webloop/symbols/go/github.com/sourcegraph/webloop/StaticRenderer:type))
that you can use to transparently render static HTML from a dynamic app, for
search engines, social previews, etc. There's an example application of this
using an AngularJS app.

There's also an included static-reverse-proxy program
([https://sourcegraph.com/github.com/sourcegraph/webloop/tree/...](https://sourcegraph.com/github.com/sourcegraph/webloop/tree/master/cmd/static-
reverse-proxy/static_reverse_proxy.go)) that reverse proxies a dynamic app,
returning statically rendered HTML. See the README
([https://sourcegraph.com/github.com/sourcegraph/webloop/readm...](https://sourcegraph.com/github.com/sourcegraph/webloop/readme))
for usage info.

I'd love to get feedback on this library and get other folks involved!

