Node API modules in HTML help

#1

Hello, so impressed with Electron… I’m a JavaScript and Electron noob, and need some pointers. I can see that I can easily use <script> tags in the HTML to call node APIs, the process api for example. I just can’t find how to do the same for other modules like ‘os’. I tried to require the ‘os’ module in my renderer.js, and linked it to a const called ‘os’. How do I now do stuff like os.arch in my HTML?

I saw one blog do this in the HTML <script>const os require(‘os’) ... os.something<\script>

Is that the right way to do it, without using the renderer.js file at all?