Giter Club home page Giter Club logo

socketio-server's Introduction

Socketio-Server

Socket.io Logo

這是一個基於 Node.js Express 建立的後端專案,專門用來提供前端專案聊天室的功能,使用 Socket.io 來提供。

基本功能為:

  1. 建立聊天室

  2. 聊天室/頻道 分群聊天 - Socket.io Rooms

  3. 註解有 Namespace 的功能,需要的使用者可自行開啟 - Socket.io Namespace

  4. Socket.io 使用 module.export 方式讓 API 那邊可以直接進行推播,可帶參數 msgBody,路由為 /chatpost

  5. 可直接清除所有聊天室,透過 /chat/delete-all-roomsdelete

介紹文章可參考 [NodeJS Become A Full Stack Developer] — 透過 Socket.io 來製作即時聊天室吧


使用方法

1. $ git clone https://github.com/RexHung0302/Socketio-Server.git

2. $ cd Socketio-Server // 或你 clone 下來的專案名稱

3. npm i // 或推上 Heroku 或 你的 Server

4. npm start // 如果不是在本地就不用跑這個

備註

  1. 這個專案僅提供實驗性質,請勿使用在盈利或者工作上,因作者不保證功能無瑕疵或者有任何 Bug,請自行承擔風險。

  2. 前端專案可參考連結


相關介紹文章

【筆記】Socket,Websocket,Socket.io 的差異

socket.io namespaces and rooms (译)

你知道 socket.io 中 connect 事件和 connection 事件的区别吗?

socketio-server's People

Contributors

rexhung0302 avatar rexxxhung avatar

Stargazers

 avatar

Watchers

 avatar

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.