nQuery icon indicating copy to clipboard operation
nQuery copied to clipboard

nodeQuery not working.

Open geekyme opened this issue 12 years ago • 1 comments

@tblobaum I need help trying to make nodeQuery work. I'm following your usage instruction. the html code below is deliberately modified to prevent github from escaping the tags.

folder:

nodeQueryTest -- app.js -- public ----- test.html -- node_modules ----- express ----- dnode ----- nodeQuery

app.js code:

var Express = require('express') , dnode = require('dnode')() , nQuery = require('nodeQuery') , express = Express.createServer()

var app = function ($) { $.on('ready', function () { $('body').append('Hello World') }) }

nQuery .use(app)

express .use(nQuery.middleware) .use(Express.static(__dirname + '/public')) .listen(3000)

dnode .use(nQuery.middleware) .listen(express)

test.html code:

!doctype html html body script src='//code.jquery.com/jquery.min.js' charset='utf-8' script type='text/javascript' src='/nquery.js' charset='utf-8' /body /html

Output ERROR:

C:\Users\shawnlim\Documents\Websites\nodeprojects\nodeQueryTest>node app

C:\Users\shawnlim\Documents\Websites\nodeprojects\nodeQueryTest\app.js:21 .use(nQuery.middleware) ^ TypeError: Object #<D> has no method 'use' at Object. (C:\Users\shawnlim\Documents\Websites\nodeprojects\nod eQueryTest\app.js:21:4) at Module._compile (module.js:449:26) at Object.Module._extensions..js (module.js:467:10) at Module.load (module.js:356:32) at Function.Module._load (module.js:312:12) at Module.runMain (module.js:492:10) at process.startup.processNextTick.process._tickCallback (node.js:244:9)

C:\Users\shawnlim\Documents\Websites\nodeprojects\nodeQueryTest>

geekyme avatar Nov 16 '12 01:11 geekyme

@tblobaum I got it working already under the following versions:

dnode 0.9.1 nodeQuery 0.0.8-9

Could you update the project to be compatible with latest dnode and express 3?

geekyme avatar Nov 16 '12 09:11 geekyme