Hiya, so Ive just discovered appenginejs and am REALLY interested in
the potential for getting into SSJS. 2 main things have me scratching
my head though atm;
1) how do I use skinning/templates (i.e. I want to format a response
with a html template page)?
I initially followed the tutorial someone else posted here to
http://blog.obtiva.com/post/978165816/deploying-a-javascript-application-to-google-appengine
. I actually got skinning working but then became aware of the
appengine-blog-example and much preferred its structure and layout.
Trouble is, I cant get skinning to work with my own simple app (based
on appengine-example). I tried to do something like the following;
var Response = require('ringo/webapp/response');
...
exports.GET = function (request) {
return Response.skinResponse('templates/index.html', {});
}
but I get the error "No valid JSGI response"
I also tried the following as I saw it in the blog example;
var Response = require("nitro/response").Response;
but get the error "Wrapped java.io.IOException: Resource "nitro/
response" not found or not readable (main.js#4)"
what am I doing wrong?
2) Id like to have some request routing to a handler object based on
the incoming request;
The example at
http://blog.obtiva.com/post/978165816/deploying-a-javascript-application-to-google-appengine
seemed to do just what I wanted with confg.js containing export.urls
and
export.app but I cant see where these things are used + dont
understand why they dont seem to be used in appengine-blog-example and
ppengine-example
I guess the under-riding problem is I don't understand the differences
between these examples mentioned above? Are there any other tutorials/
docs apart from the api docs at
ringojs.org,
nitrojs.org and
appenginejs.org that can help get up to speed?
Cheers!,
Greg