How to deploy angular universal on Plesk panel (apache)

好久不见. 提交于 2020-12-15 06:52:44

问题


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

already i insalled nodejs:

  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.


回答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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!