🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Book a DemoInstallSign in
Socket

vue-kuzzle

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

vue-kuzzle

A (very simple) Vuejs plugin shipping the Kuzzle SDK in your components

0.0.2
latest
Source
npm
Version published
Weekly downloads
6
500%
Maintainers
1
Weekly downloads
 
Created
Source

Vuejs Kuzzle Plugin

This plugin simply exposes the Kuzzle SDK in your Vuejs components.

Getting started

Install the plugin via

npm install vue-kuzzle

Then, in your Vuejs application, you need to register the plugin in your Vue class.

import VueKuzzle from 'vue-kuzzle';

Vue.use(VueKuzzle, options);

Where options may contain the following options.

options.backends

An object of available backends to connect to. Backends are POJOs of the following form (the example shows the default config):

options.backends = {
  local: {
    host: 'localhost',
    options: {
      port: 7512,
      sslConnection: false
    }
  }
};

The plugin will instantiate the Kuzzle SDK with the Websocket protocol, choosing among the available backends based on the process.env.VUE_APP_BACKEND environment variable. If this variable is not specified, the local backend is choosen as fallback.

Warning Don't forget to connect() your instance before performing any actions.

Accessing the Kuzzle SDK instance within the app

You'll be able to access the Kuzzle SDK instance from the components as

this.$kuzzle;

And from anywhere in your app where the Vue class is available, as

Vue.prototype.$kuzzle;

Keywords

kuzzle

FAQs

Package last updated on 28 Aug 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts