I am working on a project with UI side made on Angular2, and backend on NodeJs. Currently NodeJs LTE server is used. Is there a way I can deploy the whole project on another server like Apache Tomcat or Websphere or JBoss?
Asked
Active
Viewed 1,253 times
1 Answers
1
yes you can when you are building the angular 2 project , a folder name /dist will be created. if the project is using angular-cli thn run this command ng build --prod
.
you can put that /dist into any server .
for further details see this thread How to bundle an Angular app for production

Nilasis Sen
- 299
- 1
- 10
-
could you please let me know how to deploy the /dist into a server. I am new to this, so don't have much idea for the same. – Amal Aug 22 '17 at 09:56
-
after build you will have 3-4 main files, dist/main.bundle.js dist/vendor.bundle.js dist/polyfill.[hash].bundle.js the polyfill dependencies (@angular, RxJS...) bundled [ size: 62 KB for new Angular CLI application empty, 18 KB compressed]. dist/index.html entry point of your application. dist/inline.[hash].bundle.js webpack loader dist/style.[hash].bundle.css the style definitions dist/assetsresources copied from the Angular CLI assets configuration put it into /public if its node , or /www/html if any other server – Nilasis Sen Aug 22 '17 at 09:59
-
Thank you. So I have to copy the files from /dist and put it into the server's folder right? – Amal Aug 22 '17 at 10:03
-
Okau, I am using Websphere, but cannot find any folder named like /www/http. Am I look it right? Or should I look elsewhere? – Amal Aug 22 '17 at 10:06
-
I am using NGinx server, so do I have to create a folder inside /html or simply put the bundle files inside that? – Amal Aug 23 '17 at 08:53
-
/html will have the index.html in same folder other bundle.js file will resides – Nilasis Sen Aug 23 '17 at 09:12