Reputation: 1517
Please bear with me if my question is too silly.I have just started learning Angular2. When i created angular2 project is eclipse neon it and when i run it as Angular2 Web Application, it shows a web page with message "App Works".
I have one question here how it's showing the web page even when i have not configure any server like Apache-tomcat.I remember that when we create any jsp or servlet application, even to display the index.html we run the application in apache-tomcat, so how it's different in Angular2.
Thanks
Upvotes: 0
Views: 385
Reputation: 393
Angular 2 is a front end framework. HTML, JavaScript and CSS can work in the web browser without web server.
When you run Angular 2 application, you must be using lite-server which is a light weight web server that runs on node. I am sure you must have installed Node.js and npm and then ran your application using the example code provided by Angular 2.
Apache Tomcat is an application server + web server. But like I said above, you do not need an application server or web server to render your HTML, JavaScript and CSS. The browser can very well render these things without a web server if your paths are relative and correctly mapped.
Upvotes: 1
Reputation: 2905
Angular2 runs using nodejs and this is the beauty of nodejs that you can just install it and via GUI/terminal as well and it can run in any directory of your system and take control over it.
Upvotes: 1