Simple example to show connecting and making a scene switcher.
npm init
npm install obs-websocket-js --save
or...
bower init
bower install obs-websocket-js
Then include obs-websocket.js
in your HTML file.
<script type="text/javascript" src="node_modules/obs-websocket-js/dist/obs-websocket.js"></script>
and start using it.
<script>
const obs = new OBSWebSocket();
</script>