Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Update the chat example #2675

Merged
merged 3 commits into from
Nov 18, 2016
Merged

Update the chat example #2675

merged 3 commits into from
Nov 18, 2016

Conversation

darrachequesne
Copy link
Member

  • make the example autonomous (npm install && npm start)
  • add disconnect/reconnect logs (and send username on reconnection)

@MaffooBristol
Copy link

Why make it autonomous? Is it to make compilation easier for beginner devs or some other reason?

Deffo a 👍 for the extra events though 😄

@darrachequesne
Copy link
Member Author

@MaffooBristol yes, it feels easier to run it as a standalone (to me). It may be a bit superfluous though.

@MaffooBristol
Copy link

Hmm, maybe. But then is it not better for the examples to be entirely tied to the current source version rather than npm's version? Also it means that anyone editing the source can see whether it breaks the chat example, as a form of testing? Just not sure if I think it's the best idea personally.

Copy link
Contributor

@bananaappletw bananaappletw left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe in package.json
It's better to change start command to node index.js to specify file name.
The remaining parts are good!!!

@darrachequesne darrachequesne merged commit a483658 into socketio:master Nov 18, 2016
@darrachequesne darrachequesne added this to the 1.6.0 milestone Nov 20, 2016
@KevinHoughton
Copy link

I'm getting a 'cannot find module ../..' when trying to follow this example.

@darrachequesne
Copy link
Member Author

@KevinHoughton the require('../..') here is a reference to the root repository, hence the installation steps:

$ cd socket.io
$ npm install
$ cd examples/chat
$ npm install
$ npm start

You can also replace it by require('socket.io'); (and npm i socket.io, of course).

@darrachequesne darrachequesne deleted the chat branch April 21, 2017 18:53
dzad pushed a commit to dzad/socket.io that referenced this pull request May 29, 2023
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants