[x3d-public] X3D-Edit 4.0 release: HTML5 id/class/style, links for Ultimaker Cura (3D printing)

John Carlson yottzumm at gmail.com
Tue Jun 22 14:42:06 PDT 2021


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.

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.

I don’t see JavaScript much different than Python in NetBeans.   I’m still
looking for Python support in NetBeans 12.  NetBeans 8 yes.

I am merely offering my noob experience for setting up express.   There’s a
lot more to it for professional use.

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.

I think I left my express server code on GitHub in usable state, and it
includes the OpenSSL command for creating secret keys.

Beware of CSRF with the default python web server.  Django has a solution.

Likely Spring Boot is the best choice overall

Note that I don’t know if it’s possible to download the keys from my
server.   Something to check for.   Sigh!

Backend programming really is not friendly to the casual programmer, and
offering simple solutions is probably charlatanism.

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.

In any case, I look forward to a Java or Jetty server integration with
NetBeans/X3D-Edit

John

On Tue, Jun 22, 2021 at 3:43 PM Don Brutzman <brutzman at nps.edu> wrote:

> Node.js documentation:
>
> * How do I create a HTTP server? 2011-08-26
>
> https://nodejs.org/en/knowledge/HTTP/servers/how-to-create-a-HTTP-server/
>
> Looks super simple.
>
> 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.
>
> On 6/20/2021 8:42 PM, Don Brutzman wrote:
> > The CORS work remains under testing and development.
> >
> > 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.
> >
> > 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.
> >
> > 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.
>
> all the best, Don
> --
> Don Brutzman  Naval Postgraduate School, Code USW/Br
> brutzman at nps.edu
> Watkins 270,  MOVES Institute, Monterey CA 93943-5000 USA   +1.831.656.2149
> X3D graphics, virtual worlds, navy robotics
> http://faculty.nps.edu/brutzman
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://web3d.org/pipermail/x3d-public_web3d.org/attachments/20210622/01e72eb0/attachment-0001.html>


More information about the x3d-public mailing list