How to control what node.js does

2 posts / 0 new
Last post
#1 Mon, 08/07/2017 - 18:06
Jason at eROI

How to control what node.js does

Hello,

I am beginning to play with node.js for a site or two: I found the node.js installer for the pro version, and I see it running with the associated account.

What I can't see is how to modify what node loads, or most importantly how to restart node properly without being root. (send a signal?)

I CAN figure out the appropriate virtualmin commands, but it requires user root.

Are there virtualmin gui controls for:

  1. what javascript files (server.js by default on port 3000) get loaded up by node?
  2. what port numbers are chosen?
  3. installing other npm packages?
  4. how to reload server.js

I can do all of it as root at the command line. I can even do some of it as the virtual server's username (edit server.js, install npm packages...)

I would love to hear how it's done by the rest of you...

--jason

Fri, 08/11/2017 - 20:14
Joe
Joe's picture

Currently node support is pretty limited, but I've started doing Node development, myself, and I see a lot of low-hanging fruit we can develop to make the experience nicer.

So, no, there's no GUI support for any of those, except restarting the server, which I believe should appear on the Install Script page (at least, Django and RoR have restart buttons, and I assume node is no different).

I'll have to spend some time with it before I actually know how Jamie has done some of the stuff, and will have to read some code. But, suggestions and requests are welcome. It's an area where I want to spend some time now that Virtualmin 6 is out the door.

--

Check out the forum guidelines!

Topic locked