Tag: socket.io feathersjs

用Socket.io监听事件的FeathersJS是沉默的

我感觉自己如此接近这个工作,但我错过了最后一步。 它看起来像我正在按照文档,但有人可以帮助我了解我错过了什么。 这是我的@angular服务: declare var require: any const feathers = require('feathers/client'); const socketio = require('feathers-socketio/client'); const io = require('socket.io-client'); import { Injectable } from '@angular/core'; import { UserService } from './user.service'; @Injectable() export class FeathersService { socket = io.connect('http://localhost:3000/'); app = feathers().configure(socketio(this.socket)); status = this.app.service('realtime/user_status'); constructor( public user: UserService, ) { this.status.on('updated', ({status}) => { […]