Frontend for GoPlayground

223 views
Skip to first unread message

Sunny Golovine

unread,
Oct 30, 2016, 7:19:01 PM10/30/16
to golang-dev
I wanted to know if anyone can help me out here. I am trying to setup a local version of the Go playground. 

So far I've managed to setup a dockerized version of the sandbox from here: https://github.com/golang/playground

I have also managed to get a custom version of the playground from xiam (https://github.com/xiam/go-playground) up and running with the webapp and the sandbox.

Here is my problem though. I tried pairing the webapp from the custom playground with the stock sandbox and was unsuccessful because of how they handle data. There are webapp componenets in the golang/playground repo however those are designed for appengine instead of docker and come with no documentation on how to get it up and running and connected with the sandbox docker image.

Can anyone shed some light on how I can get a webapp running for the sandbox? 

Thanks!



Andrew Gerrand

unread,
Nov 3, 2016, 8:21:09 PM11/3/16
to Sunny Golovine, golang-dev
The sandbox backend just speaks JSON over normal HTTP requests. The JavaScript front end code just makes HTTP requests with a JSON payload. They don't fit together exactly, as there has always been an intermediate cache layer.

You need to write some glue to plug the two together. I'd start by writing a Go program that makes HTTP requests to the sandbox. Then write a handler that accepts requests from the JavaScript front end and passes them through to the back end.

I'm happy to handle specific questions.

Andrew


--
You received this message because you are subscribed to the Google Groups "golang-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to golang-dev+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages