[Solved] Optimize Socket io [closed]

Only being allowed to support 500-600 connections is a very broad issue. You need to distinguish what’s bottlenecking your code and analyze it to see if there’s any way to fix it. This issue may not be socket.io specific and can be caused by some other module in your application. First profile your code and … Read more

[Solved] Calling a function inside a function in node js

module.exports = { user1: { updateNewUser: (req, res, next) => { console.log(“User1”) } }, user2: { updateNewUser: (req, res, next) => { console.log(“User2”) } } } const one = require(‘./one.js’) one.user1.updateNewUser(<p1>, <p2>, <p3>) https://stackblitz.com/edit/js-vrz6t8?file=one.js 0 solved Calling a function inside a function in node js

[Solved] Express.js app entry point

It’s not clear from the code fragments in your question where the problem, because I think you’ve omitted the place where you import the auth.route.js module. The answer that follows assumes that you actually import auth.route.js in the index.js file, probably before importing middleware/auth (which isn’t actually used in the code fragment you posted). So, … Read more

[Solved] Node DOM manipulation on the page after a POST

I finally did this. You put both pages inside the one page. The two contents go to separate divs. Then you use something like this code: <script> document.querySelector(‘.div2’).style.display = “none”; document.querySelector(‘form’).addEventListener(“submit”, function(e){ document.querySelector(‘.div1’).style.display = “none”; document.querySelector(‘.div2’).style.display = “block”; }); </script> solved Node DOM manipulation on the page after a POST