0.0.2 • Published 7 years ago

socket.io-frontend v0.0.2

Weekly downloads
2
License
MIT
Repository
-
Last release
7 years ago

socket.io-frontend

The usual way to include socket.io on the frontend is via CDN:

<script src="https://cdnjs.cloudflare.com/ajax/libs/socket.io/2.0.3/socket.io.js"></script>

With many now using browserify or other front-end module managers, we need a way to include this package via import or require. socket.io-frontend is a require-able npm package that wraps the front-end version of socket.io. (since the socket.io-client package is actually for server-side clients of socket.io).

Usage

Install with:

npm install --save socket.io-frontend

or

yarn add socket.io-frontend

Then, use it in your front-end javascript like this:

require('socket.io-frontend');
io();
0.0.2

7 years ago

0.0.1

7 years ago