npm

Does your artifact manager get in the way? Join us on Oct. 8 at 10am PT, to discuss how npm can help.Sign up »

hestia.io-client

0.1.2 • Public • Published

hestia.io-client

npm version

This is the client library of Hestia.io.

Usage

The client library consists of two files

  • hestia.js (index.js): Communicate with Hestia server
    • The client of the Hestia server must include this file
  • appHeader.js: Communicate with server app
    • The client-side app must include this file

Both files are served automatically by Hestia as /hestia.js and /appHeader.js. They're also available in /dist of this repo.

<script src="/hestia.js"></script>
<script>
// Pass in root element where app’s iframe should be created
const socket = hestia(document.getElementById('root'));
 
socket.emit('start', 'Dingus');
socket.on('confirm', () => {
  console.log('Hello Dingus!');
});
</script> 

app.js:

<script src="/appHeader.js"></script>
<script>
  app.on('foo', () => {
    app.emit('bar');
  });
</script> 

Documentation

Full documentation coming soon!

License

MIT

Keywords

none

install

npm i hestia.io-client

Downloadsweekly downloads

0

version

0.1.2

license

MIT

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar
Report a vulnerability