Unfortunately that is not possible on our side especially if you're behind a NAT - you'll either need to let the public caja.appspot.com connect to your LAN or (and probably preferable for you), run caja locally as I suggested earlier.
On Thu, May 3, 2012 at 5:47 PM, Artur Ventura <[email protected]> wrote: > Thank you for your responses, however my question wasn't clear enough. > > What I want is being able to develop in localhost against a remote server. > For instance, I might be developing some caja module in my computer and > declare that my caja server is http://caja.appspot.com: > > caja.initialize({ > cajaServer: 'https://caja.appspot.com/', > debug: true > }); > caja.load(document.getElementById('guest'), undefined, function(frame) > { > frame.code('https://localhost/test.html','text/html').run(); > }); > > http://caja.appspot.com will try to connect to localhost and get the > test.html file, but that will fail, because for caja.appspot.com, localhost > is himself. Even worse, right now I'm behind a NAT so I don't have a public > IP, and that means that caja.appspot.com cannot connect to me. My question > is if its possible to create some kind of connection polling mecanism in > caja.js that allows the client to work as a proxy and deliver the source > code to the remote server. That way, I can provide a server to my developers > so they can test the code while developing their modules. > > Thank you > > On Thursday, May 3, 2012 6:27:31 PM UTC+1, ๏̯͡๏ Jasvir Nagra wrote: >> >> Oh. Artur, any content that gets copied to the ant-war directory >> fr'instance src/com/google/caja/demos/playground/examples/ would get >> served up by the same servlet. >> >> For example, you could run the clock example locally by: >> >> 1. Running the servlet as below (note the first run builds a lot of >> stuff and takes a while) >> 2. <script src="http://localhost:8080/caja.js"> >> <script> >> caja.initialize({ server: "http://localhost:8080/" }); >> caja.load(mydiv, uriPolicy, function(f) { >> f.code("http://localhost:8080/examples/clock.html").run() >> }); >> </script> >> >> On Thu, May 3, 2012 at 8:29 AM, Mike Stay <[email protected]> wrote: >> > Jas, he wants the *guest* content as well as the cajoling server to be >> > on localhost. >> > >> > On Thu, May 3, 2012 at 8:27 AM, ๏̯͡๏ Jasvir Nagra <[email protected]> >> > wrote: >> >> Hi Artur, >> >> >> >> It is. >> >> >> >> 1. svn checkout http://google-caja.googlecode.com/svn/trunk/ >> >> google-caja-read-only >> >> 2. cd google-caja-read-only >> >> 3. CLASSPATH=third_party/java/xerces/xercesImpl.jar: ant clean >> >> runserver >> >> >> >> That will start a cajoling servlet on localhost:8080 and you'll be >> >> able to follow the rest of the instructions from >> >> developers.google.com. >> >> >> >> On Thu, May 3, 2012 at 7:27 AM, Artur Ventura <[email protected]> >> >> wrote: >> >>> Hi there >> >>> >> >>> Is it possible to replicate these steps here: >> >>> >> >>> https://developers.google.com/caja/docs/gettingstarted/ >> >>> >> >>> But having the content to cajoled being present in localhost? I.E. >> >>> >> >>> frame.code('https://localhost:8080/guest.html', 'text/html') >> >>> >> >>> Or even: >> >>> >> >>> frame.code('file:///home/user/caja/guest.html', 'text/html') >> >>> >> >>> Using some kind of RPC system to provide the cajoling server with the >> >>> required content. The motivation behind this is being able to develop >> >>> the >> >>> code on your own computer without using some public remote server. >> >>> >> >>> Thank you. >> > >> > >> > >> > -- >> > Mike Stay - [email protected] >> > http://www.cs.auckland.ac.nz/~mike >> > http://reperiendi.wordpress.com
