UNPKG

sbis3-node-ws

Version:

Модуль позволяет использовать ядро интерфейсного фреймворка sbis3-ws(`core.js`) и модуль работы с данными (`Source.js`) в приложении на nodejs.

31 lines 895 B
<!DOCTYPE html> <html> <head> <title>ServerEventBus demo</title> </head> <body> <script> wsConfig = { globalConfigSupport: false, userConfigSupport: false, wsRoot: '/ws/', theme: 'wi_scheme' } </script> <script src="//dev-cdn.sbis.ru/jquery/1.6.4/jquery-min.js"></script> <script src="//dev-cdn.sbis.ru/requirejs/2.1.6/require-min.js"></script> <script src="/ws/ext/requirejs/config.js"></script> <script src="/ws/lib/core.js"></script> <script> $ws.core.ready.addCallback(function(){ require(['js!SBIS3.CORE.ServerEventBus'], function(ebc){ ebc.serverChannel('ВходПользователей').subscribe('onMessage', function(event, m){ console.log(m); }).subscribe('onError', function(event, frame){ console.log(frame); }) }) }) </script> </body> </html>