UNPKG

@scicad/models

Version:

25 lines (21 loc) 747 B
<html> <head> <title>Device</title> </head> <body> <script> const electron = require('electron'); const pkginfo = require('pkginfo')(module); const DeviceModel = require('../DeviceModel.js'); const appname = host = n = undefined; const version = module.exports.version; electron.ipcRenderer.on('ports', (e, data) => { const {mqtt_tcp_port, http_port} = JSON.parse(data); const port = mqtt_tcp_port; let storageUrl = `http://localhost:${http_port}`; const options = {storageUrl: storageUrl, resubscribe: false}; model = new DeviceModel(appname, host, port, n, version, options, electron); }); </script> </body> </html>