<div dir="auto">Express is pretty much the defacto web container for nodejs.   It allows for middleware such as a very configurable CORS middleware. I think if you search on /express CORS/ you will find the CORS middleware, available in npm.   The reason my code is so long is that I attach content type headers to the response.   Looking further into express will probably show some middleware which does content type, making the server code much simpler.   There is a wide variety of middleware for express.</div><div dir="auto"><br></div><div dir="auto">In any case, the ttf URLs in the X3DOM hello world code seem to be causing me issues.   I don’t have local ttf files available in my express server.</div><div dir="auto"><br></div><div dir="auto">I don’t see JavaScript much different than Python in NetBeans.   I’m still looking for Python support in NetBeans 12.  NetBeans 8 yes.</div><div dir="auto"><br></div><div dir="auto">I am merely offering my noob experience for setting up express.   There’s a lot more to it for professional use.</div><div dir="auto"><br></div><div dir="auto">If you can get the nodejs http server working with real X3D files with URLs, ExternProtoDeclares, security etc.,  I  would be interested.   I’ll stick with my existing infrastructure until then.</div><div dir="auto"><br></div><div dir="auto">I think I left my express server code on GitHub in usable state, and it includes the OpenSSL command for creating secret keys.</div><div dir="auto"><br></div><div dir="auto">Beware of CSRF with the default python web server.  Django has a solution.</div><div dir="auto"><br></div><div dir="auto">Likely Spring Boot is the best choice overall</div><div dir="auto"><br></div><div dir="auto">Note that I don’t know if it’s possible to download the keys from my server.   Something to check for.   Sigh!</div><div dir="auto"><br></div><div dir="auto">Backend programming really is not friendly to the casual programmer, and offering simple solutions is probably charlatanism.</div><div dir="auto"><br></div><div dir="auto">But we’re just offering a starting point.   I think that the express infrastructure is more honest than a simple http server, but I’d love to be proven wrong.</div><div dir="auto"><br></div><div dir="auto">In any case, I look forward to a Java or Jetty server integration with NetBeans/X3D-Edit</div><div dir="auto"><br></div><div dir="auto">John </div><div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Jun 22, 2021 at 3:43 PM Don Brutzman <<a href="mailto:brutzman@nps.edu">brutzman@nps.edu</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;padding-left:1ex;border-left-color:rgb(204,204,204)">Node.js documentation:<br>
<br>
* How do I create a HTTP server? 2011-08-26<br>
   <a href="https://nodejs.org/en/knowledge/HTTP/servers/how-to-create-a-HTTP-server/" rel="noreferrer" target="_blank">https://nodejs.org/en/knowledge/HTTP/servers/how-to-create-a-HTTP-server/</a><br>
<br>
Looks super simple.<br>
<br>
Any use of X3D-Edit with node.js would require download/housekeeping.  Perhaps someday we might encourage such integration (especially if Netbeans adds it) but seems premature now.  Will stay focused on editing X3D.<br>
<br>
On 6/20/2021 8:42 PM, Don Brutzman wrote:<br>
> The CORS work remains under testing and development.<br>
> <br>
> Node.js http server is possible but not a common install for end users, and so integrating a native Java and Jetty approaches are preferred for authors testing a model conversion.  We've added Python as an option to X3D-Edit since that is fairly common and easy to test.<br>
> <br>
> Thanks but no thanks for server keys, we won't be distributing anything like that with X3D-Edit.  Design goal remains safe and secure throughout.<br>
> <br>
> No need for https since this is for local user on local machine testing that their X3D model can run together with X_ITE or X3DOM.<br>
<br>
all the best, Don<br>
-- <br>
Don Brutzman  Naval Postgraduate School, Code USW/Br       <a href="mailto:brutzman@nps.edu" target="_blank">brutzman@nps.edu</a><br>
Watkins 270,  MOVES Institute, Monterey CA 93943-5000 USA   +1.831.656.2149<br>
X3D graphics, virtual worlds, navy robotics <a href="http://faculty.nps.edu/brutzman" rel="noreferrer" target="_blank">http://faculty.nps.edu/brutzman</a><br>
</blockquote></div></div>