nuxt-socket.io-module
Nuxt wrapper around Vue-Socket.io-Extended, an implementation of socket.io into Vue.
Setup
- Add
nuxt-socket.io-module
dependency to your project
yarn add nuxt-socket.io-module # or npm install nuxt-socket.io-module
- Add
nuxt-socket.io-module
to themodules
section 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 install
ornpm install
- Start development server using
npm run dev
License
Copyright (c) therealwolf42