问题
I have problem with running Angular Universal on my Plesk panel (apache):
already i insalled nodejs
:
- i do
npm run build:ssr
on my localhost and copy thedist
from localhost tohttpdocs
directory on plesk. - copied
package.json
onhttpdocs
directory; - in this step what i should do ?
I clicked on
Run script
in my Plesk and try to runserve:ssr
, but nothing happens.
回答1:
-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
来源:https://stackoverflow.com/questions/64027188/how-to-deploy-angular-universal-on-plesk-panel-apache