Use Angular 2 without Nodejs after build

Asked

Viewed 411 times

2

I am developing an application in Angular 2 using Webpack.

My doubts are, after I build for production:

  • I can run this app without the Nodejs ?
  • I can run the app Angular 2 no server, right in the browser ?
  • If I need to use some server, I can use others like the Tomcat ?
  • 1

    Yes, yes and yes. At the moment you generate the build it gives you an index.html and the rest in javascript :)

2 answers

1

Well, that’s what the Angular-cli. It has a function called ǹg build, where he himself manages the webpack to generate the ideal minified files for production.

In doing so, you can run the build of this application on a simple server (apache or Nginx) without having a headache or a super heavy node_modules folder for it to work.

0

I can run this app without Nodejs ?

If rotating would develop I believe not, but after finished you you can use the ng build command and your files will be generated compiled from there no longer need.

I can run the Angular 2 app without any server, right in the browser ?

No, need a server you can use any one here has a list of the most common.

If I need to use some server, I can use others like Tomcat ?

Yes as I answered above.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.