[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] Websocket communication in a symfony project [closed]

In the past I tried to use the Wrench library, which has a Symfony bundle : https://github.com/varspool/WebsocketBundle This is a wrapper for the Wrench library, which allows you to create websocket applications. It seems to be quite simple to configure : # app/config/config.yml varspool_websocket: servers: default: # Server name listen: ws://192.168.1.103:8000 # default: ws://localhost:8000 # … Read more

[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