I'm trying to call a client-side function from within my server side file, my server.js is something like this:
var express = require('express');
const errjs = require('./public/js/popup.js');
app.post('/signin', function(req, res, next) {
  passport.authenticate('local', function(err, user, info) {
    if (err) return next(err)
    if (!user) {
    errjs.popuperror("wrong");
      return res.redirect('/signin')
}
My popup.js code is also something like this:
function popuperror(type, message)
{
    if (type == "wrong")
    {
        $(".login-form-container .btn-line").css({backgroundColor: "#EF5350"});
        $("#loginMessage").html("Invalid Username or Password");
        $("#loginMessage").animate({opacity: 1}, 100);
        return (1);
    }
module.exports.popuperror = errjs;
Is there a way to do that even with using JQuery on the front-end js?
