Giter VIP home page Giter VIP logo

nodejs-pub-sub-chat-demo's People

Contributors

lukemcgregor avatar steffenwt avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

nodejs-pub-sub-chat-demo's Issues

how to handle server crashes and reconnection?

I have found a bug, lets say a client is connected and chatting and here if we turn off the server and then run it again and then this client tries to send another message on the same page (without refreshing the page), it gives this error in console.

D:\globalchat\nodejs-pub-sub-chat-demo-master\app_redis.js:82
socket.sessionController.publish(reply);
^

TypeError: Cannot read property 'publish' of undefined
at Socket. (D:\globalchat\nodejs-pub-sub-chat-demo-master\app_redis.js:82:28)
at emitOne (events.js:77:13)
at Socket.emit (events.js:169:7)
at D:\work\Ideas Practical\Projects\globalchat\nodejs-pub-sub-chat-demo-master\node_modules\socket.io\lib\socket.js:513:12
at nextTickCallbackWith0Args (node.js:419:9)
at process._tickCallback (node.js:348:13)

How ti fix this and how to handle crashes and clients reconnection if the server goes down?

error TypeError: Object #<Server> has no method 'configure

I have socket.io , redis and all required dependencies installed but on running I get following error

node app_redis.js

/root/node_modules/nodejs-pub-sub-chat-demo-master/app_redis.js:22
io.configure( function() {
^
TypeError: Object # has no method 'configure'
at Object. (/root/node_modules/nodejs-pub-sub-chat-demo-master/app_redis.js:22:4)
at Module._compile (module.js:456:26)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Function.Module.runMain (module.js:497:10)
at startup (node.js:119:16)
at node.js:929:3
[root@test nodejs-pub-sub-chat-demo-master]# nano app_redis.js

not working in 2018

Guys,

i tried to run demo after npm install and then node app.js but seems like demo is not running. Do you guys have any plans to make it work for 2018 updated?

Question regarding a code remark

Hi,
You have written in your code:
"// session controller class for storing redis connections
// this is more a workaround for the proof-of-concept
// in "real" applications session handling should NOT
// be done like this"

So how should it stored in real apps ?

separate files

I'm having problems when pulling anything out and putting it in a separate file.

The error is: Uncaught SyntaxError: Unexpected token <
Always on the first line.

Can't seem to work around it. Perhaps an error in the JS somewhere? I don't see where.
Are you able to put the JS from this in a separate file?

Outdated Code

In your readme you specify to npm install redis socket.io. Doing this will install the latest versions without a package.json specifying the versions that are required. Current code base doesn't work with recent versions of socket.io

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.