The Wiert Corner – irregular stream of stuff

Jeroen W. Pluimers on .NET, C#, Delphi, databases, and personal interests

  • My work

  • My badges

  • Twitter Updates

  • My Flickr Stream

    20140508-Delphi-2007--Project-Options--Cannot-Edit-Application-Title-HelpFile-Icon-Theming

    20140430-Fiddler-Filter-Actions-Button-Run-Filterset-now

    20140424-Windows-7-free-disk-space

    More Photos
  • Pages

  • All categories

  • Enter your email address to subscribe to this blog and receive notifications of new posts by email.

    Join 1,780 other followers

node.js – a nightmare to get started. Did I try the wrong technology for my problem?

Posted by jpluimers on 2017/03/08

Most of my web-stuff is on Apache. Which works fine, has TLS/SSL enabled, etc.

But I wanted to do server-side JavaScript. Which somehow is a forrest without trees, or a nightmare to get started, especially on OpenSuSE.

First of all, virtually all examples explain how to run node as a script. But none explain where to save it, how to run it as a service (and restart when it crashes: it will crash) or how to run multiple sites under it. And the scripts seems to listen to a TCP port by themselves so they operate as a full server by themselves. Nice for a fully fledged portal, but not for some one-offs.

Some links below hopefully will get me re-started later on, but for now, I’ve given up: the out-of-the-box experience is totally non-intuitive.

Maybe what I really want is something else: I want JavaScript stuff that normally renders a page in the browser through the dom to run server side so I can run XMLHttpRequest to various places without bumping into CORS stuff but still render a page DOM.

If you know a better way to do what I want (serving small mostly single-page scripts written in an easy to debug/trace language) let me know.

So basically work around this:

XMLHttpRequest cannot load http://myApiUrl/login. No
'Access-Control-Allow-Origin' header is present on the requested
resource. Origin 'null' is therefore not allowed access.

Anyway: the links:

–jeroen

One Response to “node.js – a nightmare to get started. Did I try the wrong technology for my problem?”

  1. jpluimers said

    Some interesting comments on using Go instead of node are at

    https://web.archive.org/web/20170315183007/https://plus.google.com/+JeroenPluimers/posts/aRt6Ni6XW3g

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

 
%d bloggers like this: