After performing ng build --prod I got these files in my dist folder
1: browser folder
2: server folder
3: 1.js
4: server.js
When I Run node dist/server.js it works on localhost:4000 perfectly.
Now I want to deploy it on Linux VPS Server having CentOS, how can I deploy these files?
I did below steps:
1: Installed Node Js on my server using this link : https://documentation.cpanel.net/display/CKB/How+to+Install+a+Node.js+Application
2: created a sample Hello World! NodeJS application on my sub-domain and its running fine Link : https://www.hoteljobber.com/nodejsapp/
3: hosted all my dist filse to my another subdomain for testing my app but i have fallowing Problems:
Problem 1: I have server.js file and its required app.js file for starting point some how I got this solution that I need to Create a custom startup file. ref: :https://documentation.cpanel.net/display/CKB/How+to+Install+a+Node.js+Application
Problem 2: my server.js file is around 5 MB (even I build a sample/default angular 6 app). so is this my starter file i am confuse due to its big size
Problem 3: I made server.js is custom startup file but app is not working url link : https://www.hoteljobber.com/nodetest/
I can not understand what's wrong i am doing, what is the proper way to deploy angular ng-toolkit/universal project on Linux VPS server ?