Maher
Maher

Reputation: 2547

How to deploy angular universal on Plesk panel (apache)

I have problem with running Angular Universal on my Plesk panel (apache):

already i insalled nodejs:

enter image description here

  1. i do npm run build:ssr on my localhost and copy the dist from localhost to httpdocs directory on plesk.
  2. copied package.json on httpdocs directory;
  3. in this step what i should do ?

I clicked on Run script in my Plesk and try to run serve:ssr, but nothing happens.

enter image description here

Upvotes: 0

Views: 3216

Answers (1)

Shreef Entsar
Shreef Entsar

Reputation: 103

-make sure in your "Document Root" to choose the browser folder in dist.

-in your server.ts REMOVE this if condition:

if (moduleFilename === __filename || moduleFilename.includes('iisnode')) {
  run();
}

and replace it with just:

run();

then restart your node.js app again from the plesk GUI

Upvotes: 6

Related Questions