nQuery
nQuery copied to clipboard
nodeQuery not working.
@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\nodeQueryTest>
@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?