Created
February 11, 2019 10:50
-
-
Save Aschen/0c2c9a52ee32c8647d69a2964c689ddd to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<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> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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