Wednesday, July 19, 2006

Javascript continuation based webserver

Tony Garnock-Jones has taken the server-side Javascript example I did and built a continuation based web server framework around it. His blog posting demonstrates the Seaside counter example in Javascript.

To test it out, get it from Tony's darcs repository:
darcs get http://www.lshift.net/~tonyg/javascript-server/

Fire up the Rhino interpreter with the jar's in the classpath:
java -classpath jetty.jar:jetty-util.jar:servlet-api-2.5.jar:xbean.jar:js.jar org.mozilla.javascript.tools.shell.Main

Load 'savannahside.js':
js> load("savannahside.js")

You can then test out the following urls:
  • http://localhost:8080/bean
  • http://localhost:8080/count
  • http://localhost:8080/


Categories: ,

0 Comments:

Post a Comment

<< Home