简体   繁体   中英

What is the actual advantage of running an AngularJS web app over Node.js instead of a server like Xampp?

As stated in the title,

I don't really understand how Node.js works and above all why it's actually used to run an AngularJS application (eg in WebStorm IDE this is the default option when you create an AngJS project).

I've got this doubt since I could run a simple AngularJS app on an Apache web server (within Xampp) without any involvement of NodeJS.

Thank you in advance

Node.js is an application platform. It's good for running your applications on.

Apache HTTPD is a web server. It's good at serving web pages.

They're two very different things, not directly related, and not mutually exclusive.

You are correct that many apps can run anywhere, but some benefits we've seen are:

  • Simplicity, especially for web developer also developing the server-side code/config/deploy.
  • Real-time web - easier to add in things like WebSockets and Server Sent Events if you need them.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM