Sure. I tried using it through Electron. So I just start the main.js with electron and get the error in the js console.
```
main.js
'use strict';
const electron = require('electron');
const app =
electron.app;
const BrowserWindow = electron.BrowserWindow;
require('electron-debug')({showDevTools: true});
var mainWindow = null;
app.on('ready', function() {
mainWindow = new BrowserWindow({
height: 600,
width: 800,
});
mainWindow.loadURL('file://' + __dirname + '/app/webapp.html');
mainWindow.setMenu(null);
});
```
```
webapp.html
<!DOCTYPE html>
<html lang="en">
<head>
<title>webapp</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0">
<link rel="stylesheet" href="css/font-awesome.min.css" />
<link rel="stylesheet" href="css/main.css" />
<link rel="subresource" href="css/light.css" />
<link rel="subresource" href="css/dark.css" />
</head>
<body>
<!-- Insert this line above script imports -->
<script>if (typeof module === 'object') {window.module = module; module = undefined;}</script>
<!-- normal script imports etc -->
<!-- NGL -->
<script src="dist/ngl.js"></script>
<!-- UI -->
<script src="js/lib/signals.min.js"></script>
<script src="js/lib/tether.min.js"></script>
<script src="js/lib/colorpicker.min.js"></script>
<script src="js/ui/ui.js"></script>
<script src="js/ui/ui.extra.js"></script>
<script src="js/ui/ui.ngl.js"></script>
<script src="js/gui.js"></script>
<!-- Insert this line after script imports -->
<script>if (window.module) module = window.module;</script>
</body>
<script>
//var PROTO_PATH = __dirname + '/../communication.proto';
var PROTO_PATH = '../communication.proto';
var grpc = require('grpc');
var hello_proto = grpc.load(PROTO_PATH).helloworld;
/**
* Implements the SayHello RPC method.
*/
function sayHello(call, callback) {
callback(null, {message: 'Hello ' +
call.request.name});
}
/**
* Starts an RPC server that receives requests for the Greeter service at the
* sample server port
*/
function main() {
var server = new grpc.Server();
server.addService(hello_proto.Greeter.service, {sayHello: sayHello});
server.bind('
0.0.0.0:50051', grpc.ServerCredentials.createInsecure());
server.start();
}
main();
console.log('Started server?')
</script>
</html>
```