socketio / socket.io-admin-ui

Admin UI for Socket.IO

Home Page:https://admin.socket.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Fastify implementation

Ulisseruiz opened this issue · comments

Have a demo to implement this in fastify framework?

Hi! You mean, with the fastify-socket.io plugin?

Yes for use socket.io are ok but not integrate the ADMIN UI control page.

this is an example implementation

import fastify from "fastify";
import fastifyIO from "fastify-socket.io";

const server = fastify();

server.register(fastifyIO, {
  cors: {
    origin: ["https://admin.socket.io"],
    credentials: true,
  },
});

server.ready().then(() => {
  instrument(server.io, { auth: false, development: true });
});

server.listen({ port: 3000 });

and go to https://admin.socket.io/
write on server url http://localhost:3000 and click connect