node-yql
Mar 6, 2010
The more I play around with Node.js, the more I love server-side JavaScript. Once you get over the weirdness of writing JavaScript outside of the browser, it feels very natural. And the bonus is that it is blazing fast.
Also, as I’ve been playing around with YQL (Yahoo Query Language) more lately, I realized I wanted to be able to access YQL data from within my Node app. So, I created a node-yql module.
Now you can do something like…
YQL.get("SELECT * FROM weather.forecast WHERE location=90066", function(response) {
var location = response.query.results.channel.location,
condition = response.query.results.channel.item.condition;
sys.puts("The current temperature in " + location.city + " is " + condition.temp + " degrees");
});
// Output: The current temperature in Los Angeles is 57 degrees