How to deploy Angular Universal project to standard hosting?
I have my Angular Universal project working on my localhost. So now I would like to test it on my standard web hosting with Node.js installed.
I have run:
npm run build
and received dist folder with client and server subfolders.
How should I use these folders and files into them to run the project on the hosting?
Thanks.
So I have deployed my Angular Universal project to my hosting.
I can say that the support team of my hosting gave me a lot of help. I don't know if is it possible to deploy such project on the own.
My hosting has a Node.js support. Support team of the hosting gave me an instruction how to install Node.js on the hosting using terminal on Mac or programs for Windows like PuTTY.
Then I walked through the following steps:
node dist/server/server.js
After all I can see my project working good on my domain name.
Addition. Also I tried the following way: copied my project folder (without node_modules folder) to the hosting and then run
npm install
npm run build
You can create the dist folder on the hosting also by these commands.
链接地址: http://www.djcxy.com/p/31340.html