Hi,
Happy new year
I have creating a node, I use 2 files
index.js
index.html
I had no problems with the installation of the node but i use API to load widget in my editor and when i launch my node.
I have to find the DNS localhost of my server to call my API.
In Index.js i used
os = require("os");
hostName = os.hostname();
that's work fine but in the file index.html it doesn't work (in the function oneditprepare).
I’ve read a lot of discussion about it , I tried to use environment variables and add this on settings.js like this.
process.env.HOST_NAME = "eurekapr";
but I failed to recover the value in my file ,index.html.
The html file and oneditprepare function run on the browser client side which is pure JavaScript and doesn’t have access to nodejs things like os. etc If you need things from server side the client has to do a request to get them.