I have Put A textfield in the ejs file under script tag
var message = document.getElementById("typing").value;
I want this variable Message having the keyword that need to be searched in the database (mongodb)
I can use NodeJs file to connect with db and find things i want
dbo.collection('Leave').find({$text:{$search : " those "}},{projection:{_id: 0, What_are_those:1}}).toArray(function(err, result) {.......});
but i am not ablle to connect it on with ejs and nodeJS. Basically the connection or binding between the two.