You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@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.
!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
C:\Users\shawnlim\Documents\Websites\nodeprojects\nodeQueryTest\app.js:21
.use(nQuery.middleware)
^
TypeError: Object # 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)
@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 # 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>
The text was updated successfully, but these errors were encountered: