Skip to content
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

Fastify implementation #68

Open
Ulisseruiz opened this issue May 14, 2023 · 3 comments
Open

Fastify implementation #68

Ulisseruiz opened this issue May 14, 2023 · 3 comments

Comments

@Ulisseruiz
Copy link

Have a demo to implement this in fastify framework?

@darrachequesne
Copy link
Member

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

@Ulisseruiz
Copy link
Author

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

@oktavianto
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants