Skip to content

Instantly share code, notes, and snippets.

@desmondmorris
desmondmorris / gist:2814275
Created May 27, 2012 13:50
Terms for current node View
$view = new view;
$view->name = 'terms';
$view->description = '';
$view->tag = 'default';
$view->base_table = 'node';
$view->human_name = 'Terms';
$view->core = 7;
$view->api_version = '3.0';
$view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */
app.router.get('/:slug', function (slug) {
Shortlink.find( {slug: slug} , function (err, shortlink) {
if (err) { throw new(Error)(err) }
console.log( this.req ); // This returns "undefined" and I think I understand why.
// How do I access request and response objects from within
// an anon callback like this one?
});
});
{
"name": "dezzme",
"subdomain": "dezzme",
"scripts": {
"start": "index.js"
},
"version": "0.0.0-5",
"engines": {
"node": "v0.6.x"
},