I am reading a book "Real-Time Communication with WebRTC", it says:
Node.js is an extremely powerful software platform that allows users to easily build scalable server-side applications with JavaScript. It is based on a single-threaded event loop management process making use of nonblocking I/O. The library provides a built-in HTTP server implementation, making it independent from third-party software components. With Node.js, it is really easy for the programmer to implement a high-performance HTTP server with customized behavior with just a few lines of code.
I already use XAMMP as a local HTTP server, why do i need Node.js? What's the difference with Node js and XAMPP? I am new to Node.js stuff.
XAMPP and a node. js is two different things, which do not need to work together, nor do they need each other. XAMPP consists of Apache, MySQL, PHP and Perl.
XAMPP and a node. js are two different things. And they do not need to work together, they also don't need eachother. XAMPP consists of Apache, MySQL, PHP and Perl.
Due to the V8 engine, asynchronous execution, and real-time server interaction, Node. js offers a better execution speed and certainly outperforms PHP. Node. js sends a request to the computer's file system.
If you're prepared to re-write your PHP in JavaScript, then yes, Node. js can replace your Apache. If you place an Apache or NGINX instance running in reverse-proxy mode between your servers and your clients, you could handle some requests in JavaScript on Node.
XAMPP and Node.js are completely different:
XAMPP is a distribution consisting of Apache, MySQL and PHP. So you are using Apache as your web server.
Node.js is a Javascript framework. You could build you own web server with Node.js
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With