GithubHelp home page GithubHelp logo

ligaofeng / hyperf-socket-chat Goto Github PK

View Code? Open in Web Editor NEW
4.0 1.0 1.0 172 KB

基于hyperf的socket.io和socket.io.js开发的web聊天演示样例

Shell 0.79% Dockerfile 3.22% PHP 81.54% PLpgSQL 3.52% CSS 1.10% JavaScript 6.90% Blade 2.93%

hyperf-socket-chat's Introduction

介绍

基于Hyperf项目官方样例( https://github.com/hyperf/hyperf-skeleton )开发的一个基于socket.io与前端socket.io.js( https://socket.io )库Web IM聊天demo

安装环境要求

安装说明与 https://github.com/hyperf/hyperf-skeleton 上要求的一致

安装

检出代码后直接: $ composer update

本项目演示所用的SQL文件在要目录下的hyperf.sql中。

再启动即可: $ php bin/hyperf.php start

web页面监听的是9501端口: http://localhost:9501/

socket协议监听的是9502端口: ws://127.0.0.1:9502

测试9501端口服务是否正常: http://127.0.0.1:9501/index

模拟uid为1的在房间1的Demo样例: http://127.0.0.1:9501/view/socket1

模拟uid为2的在房间1的Demo样例: http://127.0.0.1:9501/view/socket2

以上两个Demo样例正常情况如下: image

hyperf-socket-chat's People

Contributors

ligaofeng avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

imhuso

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.