Skip to content

Instantly share code, notes, and snippets.

@Aschen
Created February 11, 2019 10:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Aschen/0c2c9a52ee32c8647d69a2964c689ddd to your computer and use it in GitHub Desktop.
Save Aschen/0c2c9a52ee32c8647d69a2964c689ddd to your computer and use it in GitHub Desktop.
<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