Node.js allows the creation of web servers and networking tools using JavaScript and a collection of “modules” that handle various core functionalities.[14][17][30][31][32] Modules are provided for file system I/O, networking (DNS, HTTP, TCP, TLS/SSL or UDP), binary data (buffers), cryptography functions, data streams and other core functions.[17][31][33] Node.js’s modules use an API designed to reduce the complexity of writing server applications.[17][31]
JavaScript is the only language that Node.js supports natively, but many compile-to-JS languages are available.[34] As a result, Node.js applications can be written in CoffeeScript,[35] Dart, TypeScript, ClojureScript and others.
Node.js is primarily used to build network programs such as web servers.[30] The most significant difference between Node.js and PHP is that most functions in PHP block until completion (commands execute only after previous commands finish), while Node.js functions are non-blocking (commands execute concurrently or even in parallel,[36][37][improper synthesis?] and use callbacks to signal completion or failure).[30]
Node.js is officially supported by Linux, macOS and Microsoft Windows 8.1 and Server 2012 (and later),[3] with Tier 2 support for SmartOS and IBM AIX and experimental support for FreeBSD. OpenBSD also works, and LTS versions are available for IBM i (AS/400).[38] The source code may also be built on similar operating systems that are not officially supported, such as NonStop OS[39] and Unix servers.
Leave a Reply