-
Notifications
You must be signed in to change notification settings - Fork 253
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
后端的代码可以开源吗 #3
Comments
@mariotong 你好,后端部分在 https://github.com/microzz/vue-chat/blob/master/build/dev-server.js 真正机器人、IP定位部分调用了我自己的接口,这个在代码里可以看到接口,自己封装了起来,后端代理了一下,其实用的是图灵机器人,IP定位用了百度的服务,这两个接口都已经开放,地址在应用里面 |
@microzz 有koa版本的吗 |
@mariotong 你好,koa是我自己线上版本。部分后端代码肯定不能开源的,你可以使用我封装的几个接口,代码中有 |
我代码是这样的: const Koa = require('koa');
const app = new Koa();
const server = require('http').Server(app.callback());
const io = require('socket.io')(server);
io.on('connection', function(socket){
io.emit('this', { will: 'be received by everyone'});
socket.on('private message', function (from, msg) {
console.log('I received a private message by ', from, ' saying:', msg);
});
socket.on('disconnect', function () {
io.emit('user disconnected');
});
}); 但是前端请求不到数据,该如何做呢,能否指导下如何koa2实现呢?感激不尽。 |
请教下 vue-cli 不支持 koa么? 不然express和koa都要写的话成本有点大吧 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
智能机器人那块的接口,你后端也是调用别人的吗
The text was updated successfully, but these errors were encountered: