Node.js On Windows Server with Plesk

What about local?

This error means that the file or directory does not exist on the server. Create the file or directory and try the request again.

The message says it all

If we then look at the path:

D:\home\edimg.it\edimg\public\index.js

it is looking for the start file (index.js) in public

This shows me that the remote host has not been setup properly.

In a previous discussion, I showed you how to configure the host. I included this image:

image

as well as

image

But it seems to me that’s exactly what it is

Schermata 2020-07-16 alle 00.33.58

But I don’t think it’s an extension problem.
The correct file should be reached by the router
I think it’s really a path problem not found

Compare these entries

with mine, which read /app/public

Yes, I had noticed it but it doesn’t seem editable

The entry in the Node window is most certainly editable. For the other entry, please get in touch with the host.

Adding to my previous post, you may (not sure) need to change the path to
/edimg/app/public

Ben, actually in the public folder the index.js file doesn’t exist.
I can eventually insert it, but if Teodor says that we only have to use the files inserted in Pages and the router and that we absolutely must not modify the other files …

Teodor is correct. Having the files in the public folder will open the server/configuration files to prying eyes.

At this point I think and hope it is a server problem. Tomorrow contact Hosting assistance

1 Like

Anyway I ask Teodor
If the setting of node.js is the correct one, which foresees a root folder “xxx” and points to the folder “xxx / public”, because in the “public” folder there is no index.js file, and instead it is present in “xxx”?

Stupid question.
Isn’t it by chance that it’s a permissions problem of some folder?

Did you already tested it locally (with the implemented NodeJS Server in Wappler)?

What do you mean by server implemented in Wappler?

I have three targets: Local / Development / Remote
with the index.ejs file open if I click on “Open in Browser” I get the following results:

  • Development -> OK
  • Remote -> not work
  • Local -> generates warning (please select a target with web server)

If I’m undestanding you correctly everything works on your Development Target (local)?

That’s how my Development Target looks like:

1 Like

For what you asked me, everything is OK

I requested Hosting assistance to identify the problem (which occurs on 4 domains where I ran the same node.js configuration)
I think it is a problem to be charged to the server, but I await an answer.
Meanwhile, I noticed that installing NPM some errors are detected
Maybe that’s the problem here
Schermata 2020-07-16 alle 16.18.29

They are warnings, not errors. So I don’t think it’s that.

If your app works locally(your development system) and it doesn’t remotely it is most probably your server config as pointed out by Ben and also stated by yourself.

Hopefully you get this sorted out soon.