Giter Club home page Giter Club logo

mm_chat's Introduction

聊天室

秘密聊天室,使用vue搭建界面,php的扩展swoole写websocket服务端,具有发表情,发图片(能粘贴/推拽图片发送),@某人的功能。

访问链接:点击进入聊天室

Build Setup

#install dependencies
npm install
# serve with hot reload at localhost:8080
npm run dev
# build for production with minification
npm run build
# build for production and view the bundle analyzer report
npm run build --report

upload_api文件夹的auth.php为文件上传授权接口,chat_server文件夹的脚本为提供websocket服务端的脚本,在php cli模式下运行

  • 需要安装redis,安装php_redis扩展,安装swoole扩展
  • 运行前请配置chat_server/run.php里面的图灵机器人apiKey(tuling_robot_apikey)
  • 配置upload_api/public/auth.php里面的腾讯对象存储参数,如下:
// 配置参数
$config = array(
    'Url' => 'https://sts.api.qcloud.com/v2/index.php',
    'Domain' => 'sts.api.qcloud.com',
    'Proxy' => '',
    'SecretId' => '', // 改自己的
    'SecretKey' => '', // 改自己的
    'Bucket' => 'ssss-1234123',// 改自己的
    'Region' => 'ap-beijing',// 改自己的
    'AllowPrefix' => 'images/*', // 不需要改
);
  • 修改前端配置,Tools.js:
conf:{
    host:'192.168.117.142',//改成你自己的host,不要带http/https
    bucket: "chat-room-1256151484", //改成你自己的腾讯云bucket
    region: "ap-beijing" //改成你自己的腾讯云region
}

mm_chat's People

Contributors

baagee avatar

Watchers

James Cloos avatar sunnyyyminigo 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.