Setting up server side rendered angular app in plesk

Viewed 824

I have setu server side rendering in my angular app using nguniversal and it is working fine in my local where I can serve the files using

npm run serve:ssr

which will run the following command

node dist/moviesplay/server/main.js

How can I implement this in my remote server with plesk?

I tried using the plesk nodejs extension and set the application root and startup file as follows

Document Root /httpdocs/angular/dist/moviesplay/server    
Application Mode production  
Application URL ********
Application Root /httpdocs/angular/dist/moviesplay/server   open  
Application Startup File main.js   

screenshot

2 Answers

I had the same problem. The document root folder which is the angular files must be inside application root folder.

Basically the server folder must be the parent directory of UI folder

It worked for me.

you need to change the Document Root folders

Document Root /httpdocs/angular
Application Mode production  
Application URL ********
Application Root /httpdocs/angular 
Application Startup File dist/server/main.js
Related