【websocket】socket.io 例子:chat服务

  • 基于socket.io快速实现一个实时通讯应用 看起来是一篇超牛的文章。

Socket.IO Chat

A simple chat demo for Socket.IO

How to use

$ npm i
$ npm start

And point your browser to http://localhost:3000. Optionally, specify
a port by supplying the PORT env variable.

Features

  • Multiple users can join a chat room by each entering a unique username
    on website load.
  • Users can type chat messages to the chat room.
  • A notification is sent to all users when a user joins or leaves
    the chatroom.

你可能感兴趣的:(网络服务入门与实战,socket.io)