nuxt-socket.io-module

1.0.3 • Public • Published

nuxt-socket.io-module

Nuxt wrapper around Vue-Socket.io-Extended, an implementation of socket.io into Vue.

npm version npm downloads Circle CI Codecov License

📖 Release Notes

Setup

  1. Add nuxt-socket.io-module dependency to your project
yarn add nuxt-socket.io-module # or npm install nuxt-socket.io-module 
  1. Add nuxt-socket.io-module to the modules section of nuxt.config.js
{
  modules: [
    // Simple usage
    'nuxt-socket.io-module',
 
    // With options
    [
      'nuxt-socket.io-module',
      {
        autoConnect: false,
        url: 'http://localhost:9001',
        action: 'nuxtSocketReady'
      },
    ],
  ]
}
  1. Put your business logic into the vuex action: nuxtSocketReady (or choose a custom name), which is called as soon as the module is loaded.

Development

  1. Clone this repository
  2. Install dependencies using yarn install or npm install
  3. Start development server using npm run dev

License

MIT License

Copyright (c) therealwolf42

Readme

Keywords

none

Package Sidebar

Install

npm i nuxt-socket.io-module

Weekly Downloads

3

Version

1.0.3

License

MIT

Unpacked Size

6.05 kB

Total Files

6

Last publish

Collaborators

  • therealwolf