Coder Social home page Coder Social logo

itfun_workerman's Introduction

laravel_worker项目使用方法

  1. 复制 .env.example.env,配置数据库信息,并自行在 mysql 中建一个对应的数据库。
  2. composer install 安装相关包。
  3. php artisan key:generate 生成应用Key。
  4. php artisan migrate 运行迁移生成数据表。
  5. 使用 php artisan serve 启动服务。
  6. 打开一个新命令行窗口,cd socket/GatewayWorker
  7. php start.php start启动 socket 服务。
  8. 访问 http://localhost:8000,并自行注册账号。

win下可能出现无法连接

此问题只发生在 windows 操作系统中,linuxmac 中没有此问题。 所有的 0.0.0.0,需要修改成 127.0.0.1

1.请在 socket/GatewayWorker/Applications/YourApp/start_gateway.php 中,修改为

$gateway = new Gateway("websocket://127.0.0.1:7272");

2.resources/assets/js/components/ChatRoom.vue 中,修改为

let ws = new WebSocket("ws://127.0.0.1:7272");

itfun_workerman's People

Watchers

 avatar  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.