I have a node.js + express app and I installed jQuery with npm.
app.js file I used
var jquery = require('jquery');
When you are installing
npm it's because you want to use
jQuery on the server side of your application (Ex : in your
app.js file). You still need to add
jQuery to your web page like that :
If you want to use it on the client side. If you are using
Jade, add the script tag to your template.
If you want a jquery npm module to be served by an express app then add this line to the server script (in your case
app.use('/jquery', express.static(__dirname + '/node_modules/jquery/dist/'));
After that you can include it in your html file: