[Solved] Click a button in two pages at once

Out of Curiosity i just tried MartinWebb’s answer. I hope it might give you a start. Page # 1: <button type=”button” onclick=”hello()”>Hello</button> <script type=”text/javascript”> // window.localStorage.removeItem(“text”); function hello() { window.localStorage.setItem(“text”,”Hello there..”); } </script> Page # 2: <p id=”show”></p> <script type=”text/javascript”> window.addEventListener(‘storage’, storage_event_listener, false); function storage_event_listener(evt) { document.getElementById(“show”).innerText = evt.newValue; // console.log(evt); } </script> You can … Read more

[Solved] NodeJS MongoDB Connection

you need to install mongoose from npm by this command: npm install –save mongoose then,include following line of code: var mongoose = require( ‘mongoose’ ); var db = mongoose.createConnection(‘mongodb://localhost:27017/dbname’); db.on(‘connected’, function () { logger.info(‘Mongoose connection open to master DB – ‘+ ‘mongodb://localhost:27017/dbname’); }); module.exports = db; 1 solved NodeJS MongoDB Connection

[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