Cipher-Chat-Back-End:密码聊天Flutter应用后端

  • r8_799649
    了解作者
  • 7.5KB
    文件大小
  • zip
    文件格式
  • 0
    收藏次数
  • VIP专享
    资源类型
  • 0
    下载次数
  • 2022-04-29 00:14
    上传日期
Cipher-Chat-Back-End:密码聊天Flutter应用后端
Cipher-Chat-Back-End-master.zip
  • Cipher-Chat-Back-End-master
  • .gitignore
    13B
  • index.js
    581B
  • package-lock.json
    20.9KB
  • package.json
    322B
内容介绍
const app = require('express')() const http = require('http').createServer(app) app.get('/', (req, res) => { res.send({ status: "Node Server is running. Yay!!" }) }) //Socket Logic const socketio = require('socket.io')(http) socketio.on("connection", (userSocket) => { console.log('A User COnnected'); userSocket.on("send_message", (data) => { console.log('Recieved', data); userSocket.broadcast.emit("receive_message", data) }) }) http.listen(process.env.PORT || 3000, () => { console.log('Listening on port', process.env.PORT || 3000); })
评论
    相关推荐