guivic / fastify-socket.io

Fastify socket.io plugin.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

@guivic/fastify-socket.io

npm version nodejs workflow

Installation

npm install @guivic/fastify-socket.io --save

yarn add @guivic/fastify-socket.io

Usage

Per default Socket.io will listen on your server address.

fastify.register(require('@guivic/fastify-socket.io'), options, (error) => console.error(error));

fastify.get('/', (request, reply) => {
	console.log(fastify.io) // Socket.io instance
});

Options

Socket.io configuration object.

https://socket.io/docs/server-api

License

Licensed under MIT.

About

Fastify socket.io plugin.

License:MIT License


Languages

Language:JavaScript 100.0%