ichat
是一款基于muse-ui和vue.js的移动端聊天应用,融合了单聊和群聊等功能.
源码地址:https://github.com/zhengze/ichat-frontend
$npm install
$npm run serve
或者
$npm run development
npm run build
VUE_APP_BASE_API=http://192.168.1.6:5050
NODE_ENV=development
VUE_APP_BASE_API 后端API NODE_ENV 开发模式
module.exports = {
devServer: {
proxy: {
‘/socket.io‘: {
target: ‘http://192.168.37.120:5050‘,
ws: true,
changeOrigin: true
},
‘sockjs-node‘: {
target: ‘http://192.168.37.120:5050‘,
ws: false,
changeOrigin: true
},
}
}
}
proxy 为代理配置项,修改target为socket server位置
vue.config.js配置详情请看https://cli.vuejs.org/zh/config/#vue-config-js
联系方式
qq群:88606218
issues: https://github.com/zhengze/ichat-frontend/issues
原文:https://www.cnblogs.com/zhengze/p/12814639.html