• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion
  • Inviting everyone to the UX test of a new security feature in the WP Toolkit
    For WordPress site owners, threats posed by hackers are ever-present. Because of this, we are developing a new security feature for the WP Toolkit. If the topic of WordPress website security is relevant to you, we would be grateful if you could share your experience and help us test the usability of this feature. We invite you to join us for a 1-hour online session via Google Meet. Select a convenient meeting time with our friendly UX staff here.

Question How does node work on plesk?

MarioSmith91

New Pleskian
Greetings,

I wrote an application in node that uses a web server node set on port 3000 on this web server I created a client-side GUI (fontEnd) that allows you to do some operations such as:

- CLICK A BUTTON 'Start program number 2'
- CLICK A BUTTON 'Stop program number 2'
- Change program settings

When you click on Start program number 2 the web server sends via ajax (with the POST method) a variable to the webServer.js script which in turn triggers a function
which starts another script node (prog2.js) via the spawn method which starts a child_process, all console.log and program outputs (prog2.js) are redirected to weServer.js
via the node socket.io module. All this works perfectly if I activate node via SSH and connect to the ip of my Ex server:

- 111.111.111.111:3000


If, on the other hand, I use the domain that I set from Plesk and I activate node from the domain extension on Plesk through the Plesk nod js extension, Ex:

- mydomain.com

With port 3000 (mydomain.com:3000) it doesn't work, but it works if I just put the domain without port (mydomain.com), so it's as if Plesk set the basic web port directly

that is the 80, moreover if I try to click the button 'Start program number 2' I do not receive the redirection of the output of the second script, so I believe that I can not even

start the child_process.

Why does he do this? How does the Plesk node work? How can I get a console so I can understand what's going on? Where can I find documentation on how Plesk works on node?


Thank you in advance for your availability.


PS
Please enlighten me :)
 
Back
Top