Git Product home page Git Product logo

socket.io-website's Introduction

Website

This website is built using Docusaurus 2, a modern static website generator.

Installation

yarn install

Local Development

yarn start

This command starts a local development server and opens up a browser window. Most changes are reflected live without having to restart the server.

Build

yarn build

This command generates static content into the build directory and can be served using any static contents hosting service.

Deployment

GIT_USER=<Your GitHub username> USE_SSH=true yarn deploy

If you are using GitHub pages for hosting, this command is a convenient way to build the website and push to the gh-pages branch.

socket.io-website's People

Contributors

a847244052 avatar abcdan avatar abdulazeez-dolapo avatar adamdemirel avatar agrattan0820 avatar anders-e avatar antimatter96 avatar bits-by-brandon avatar carrettariccardo avatar cdehaan avatar chataround-dev avatar chris9740 avatar dancrumb avatar danielasaboro avatar darrachequesne avatar dbwcooper avatar dependabot[bot] avatar gustavothecoder avatar hadber avatar hay avatar igcarun avatar kevinguo-ed avatar paddyohanlon avatar pandaphobic avatar phrawzty avatar rase- avatar rauchg avatar sagekwun avatar temajm avatar webreflection 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  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

socket.io-website's Issues

Chat Demo "Emitting events" Issue?

I am brand new to both node.js and to socket.io so this could easily be a problem on my end.

When following the socket.io chat demo exactly as is posted on the current website everything works as one would expect up to the section of "Emitting events", every time I write something in the chat box the page just refreshes and the communication is never logged on the other side. Either something is incorrect or a step is not documented that should be.

Documentation error: Sending messages from the outside-world

Hi
In a page we have those examples

var io = require('socket.io')(3000);
var redis = require('socket.io-redis');
io.adapter(redis({ host: 'localhost', port: 6379 }));

and

var io = require('socket.io-emitter')();
setInterval(function(){
  io.emit('time', new Date);
}, 5000);

But if you try to copy and paste those samples, you find out - that's doesn't work.
Process failed with

    if (!opts.socket && !opts.host) throw new Error('Missing redis `host`');
                                    ^

Error: Missing redis `host`
    at new Emitter (/home/alexander/WebstormProjects/untitled/node_modules/socket.io-emitter/index.js:60:43)
    at Emitter (/home/alexander/WebstormProjects/untitled/node_modules/socket.io-emitter/index.js:47:42)
    at Object.<anonymous> (/home/alexander/WebstormProjects/untitled/index.js:17:45)
    at Module._compile (module.js:570:32)
    at Object.Module._extensions..js (module.js:579:10)
    at Module.load (module.js:487:32)
    at tryModuleLoad (module.js:446:12)
    at Function.Module._load (module.js:438:3)
    at Module.runMain (module.js:604:10)
    at run (bootstrap_node.js:394:7)

Process finished with exit code 0

If we look to socket.io-emitter page on GitHub we find out that we need pass options when creating object

var io = require('socket.io-emitter')({ host: '127.0.0.1', port: 6379 });

but information on page in this page doesn't reflecting this.

Error on the 'Migrating from 0.9' Page

Currently:

io.use(function(socket, next) {
  var handshakeData = socket.request;
  // make sure the handshake data looks good as before
  // if error do this:
    // next(new Error('not authorized');
  // else just call next
  next();
});

should be:

io.use(function(socket, next) {
  var handshakeData = socket.request;
  // make sure the handshake data looks good as before
  // if error do this:
    // next(new Error('not authorized'));
  // else just call next
  next();
});

The API documentation isn't thorough

Hey! Thanks for a great library.

Here are some undocumented features from the API that could be mentioned on http://socket.io/docs.

  • Namespace#in is like Socket#in but namespaced
  • Namespace#emit is like Socket#emit but for a namespace (or room in a namespace)
  • Socket#handshake provides various useful bits of info

There are more (Namespace#adapter, for instance).

Overall, I think socket.io's documentation would be much nicer if there was a complete list of all public members & methods in a single location. Right now, the API is partially documented over these three pages: "Server API", "Client API" and "Rooms and namespaces" and they are more like prose than a reference. I often end up having to go spelunking in the source code to see the exact shape of the API.

The DefinitelyTyped TypeScript definition file for socket.io is very useful (though it lacks some minimal comments) but it's incomplete too, probably because it was built from the documented API rather than ground truth.

Anyway, I hope you'll take those comments under consideration, and once again, thanks for all the amazing work!

Production Server SSL within a folder

Hello,

Thank you for this tools, I made it work on localhost, but I would like to make it work on my production server (Apache) with SSL activated and within a subfolder

example
mywebsite.com/websocket

Thanks

Chat demo downloading javascript over HTTP

On http://socket.io/get-started/chat/ the "Emitting Events" section displays some sample code for the client side that includes:

<script src="http://code.jquery.com/jquery-1.11.1.js"></script>

Since a lot of beginners are going to be reading this guide we probably shouldn't give such bad advice, opting instead for https. Incidentally the example code in https://github.com/socketio/socket.io/tree/master/examples/chat is correct; it's just the website that's out of date.

Typo on http://socket.io/docs/#sending-volatile-messages

If a certain client is not ready to receive messages (because of network slowness or other issues, or because they’re connected through long polling and is in the middle of a request-response cycle), if they doesn’t receive ALL the tweets related to bieber your application won’t suffer.

Should change to:

... if it doesn’t receive ALL ...

Adding search to the documentation

Hey 👋

I think it would be nice to add search to the documentation and tutorials, since it's quite a bit faster than going through different pages.

At Algolia we offer DocSearch as a free option for community to search within documentation. If you agree I'd like to set it up here.

Enjoy your day ❇️

Chat example broken (Access-Control-Allow-Origin etc.)

GET http://slack.socket.io/socket.io/?EIO=3&transport=polling&t=LVesgWJ
XMLHttpRequest cannot load http://slack.socket.io/socket.io/?EIO=3&transport=polling&t=LVer5WW. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://socket.io' is therefore not allowed access. The response had HTTP status code 502.

GET http://chat.socket.io/socket.io/socket.io.js net::ERR_INCOMPLETE_CHUNKED_ENCODING

Uncaught ReferenceError: io is not defined(…)

The polling error pair repeats and later on there's also
GET http://platform.twitter.com/widgets.js net::ERR_NAME_RESOLUTION_FAILED

Code Formatting, Docs Page

screen shot 2015-02-06 at 12 11 45 pm

Because this is in a code block, it's spitting out &amp;#039;, for example, instead of &' (assuming that was the intent).

Showing up in Chrome Version 40.0.2214.111 (64-bit), currently up-to-date.

Issue with Slack button in Header on socket.io website

I want to:

  • Report a bug

Current behaviour

While browsing the socket.io website, the Slack button in Header shows number 42 first(which is the no. of users who are currently online on slack), then in 2-3 seconds, it shows the actual no. of users who are online on slack. This problem persists on every refreshing or loading of the webpage as Header is viewable all the time, so this looks very odd to see 42 first and then the actual no. of users.

I've tried to run the website on other browsers (chrome, microsoft edge and in android phones also) but the problem is same. I am attaching the pic also.

socket1

Steps to reproduce (if the current behaviour is a bug)

I tried to debug the code then I found out that 42 is actually a constant to the slack button, which always popup first then the correct no. of users come up.
I found it here:
home.js

socket 3

But, I didn't understand, why you did this? Due to UX or is it a bug?
Should I submit a PR after refactoring it?

Expected behaviour

On loading or refreshing the page, the slack button should only show the number of users who are currently online instead of 42 at first.
It should be like this:

socket2

Setup

Replace missing browser usage example

Hi I came to verify how to connect to socket.io while writing a stackoverflow answer

When I last used the project, there were obvious examples showing the minimal code required on server and browser.

I now only see the server example. Even after navigating to Get Started, Demos and Docs I do not see a usage example for how to source and instantiate the io object.

Unofficial examples section

Hello,

After spend a lot of time trying to make a cluster with socket.io + socket.io-redis I would like to share my experience with the community and my suggestion is to add a new section in the site called "Unofficial examples" to share this kind of projects. To make this cluster work was a difficult experience for me and I found a lot of people with the same problems.

In this section the authors of open source projects could share some links with solutions explaining more about socket.io and details about that.

What do you think ?

Get started typo

There is a typo in http://socket.io/get-started/chat/:

Let’s refactor our route handler to use sendfile instead:

app.get('/', function(req, res){
  res.sendFile('index.html');
});

sendfile should be written without a capital: sendFile gives an error (very confusing for a beginner) :)

npm

npm should never be capitalized.
It is captilized here and twice on the "download" page which doesn't seem to be in the repository.

Multiple chat rooms

Hello,

Thanks for this Repo!

Is it possible to start multiple chat rooms and how?

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.