Express render & Jquery issue


#1

Hi Yall!
i’m having an issue with ExpressJs rendering and Jquery.

in my app.js (main file) i have

restapi=require('express')();
const pug = require('pug');
restapi.use(express.static(__dirname+"/public"));
restapi.set('views', __dirname+'/views');
restapi.set('view engine','pug');
restapi.get("/view/:datalog?",(req, res)=>{
  var datalog=req.params.datalog;
  res.render("index",{title:"Hey",rows:"hello"});
         
})

my index.pug file is

> html
>       head
>       title= title
>       script(src='/js/jquery-3.1.1.min.js')
>       script.
>         window.$ = window.jQuery = module.export;
>         $().ready(function(){console.log("READY")});
>         (alert("HELOOOOOOOOOOOOOOOOO"))
>       body
>         rows

it throws me an error that can’t find jquery module
if i remove the window.$ = window.jQuery = module.export (i’ve tryed even with = require(“jquery”) instead of module export) the simple javascript shows me the alert.

i’ve even tryed to link jquery script to the cdn repository. it always gets me error.

i’ve even tryed moving all the files to the root folder with no public/static assignment.

nothing seems to work…
What am i missing?!