Instantly share code, notes, and snippets.

Embed
What would you like to do?
<template>
<div>
<button @click="testMe()">Click Me</button>
</div>
</template>
<script>
import kuzzle from '@/kuzzle'
export default {
name: 'Test',
data() {
return {
};
},
methods: {
async testMe() {
const response = await kuzzle.server.info();
console.log(response)
}
}
};
</script>
<style lang="sass">
</style>
const { Kuzzle, WebSocket } = require('kuzzle-sdk/dist/kuzzle');
const kuzzle = new Kuzzle(
new WebSocket('localhost')
);
window.kuzzle = kuzzle;
export default kuzzle;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment