1.0.3 • Published 6 years ago
nuxt-socket.io-module v1.0.3
nuxt-socket.io-module
Nuxt wrapper around Vue-Socket.io-Extended, an implementation of socket.io into Vue.
Setup
- Add 
nuxt-socket.io-moduledependency to your project 
yarn add nuxt-socket.io-module # or npm install nuxt-socket.io-module- Add 
nuxt-socket.io-moduleto themodulessection ofnuxt.config.js 
{
  modules: [
    // Simple usage
    'nuxt-socket.io-module',
    // With options
    [
      'nuxt-socket.io-module',
      {
        autoConnect: false,
        url: 'http://localhost:9001',
        action: 'nuxtSocketReady'
      },
    ],
  ]
}- 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
- Clone this repository
 - Install dependencies using 
yarn installornpm install - Start development server using 
npm run dev 
License
Copyright (c) therealwolf42