What is Node.js?
Node.js is an open-source server side runtime environment built on Chrome's V8 JavaScript engine for building highly scalable server-side application using JavaScript
Node.js can be used to build different types of applications such as command line application, web application, real-time chat application, REST API server etc
However, it is typically used to build network programs like web servers, similar to PHP, Java, or ASP.NET
Node.js was written and introduced by Ryan Dahl in 2009
Visit Wikipedia to know the history of Node.js
Node.js official web site: https://nodejs.org
Node.js source on github: https://github.com/nodejs/node
Why Node.js?
- Node.js uses asynchronous programming which is non-blocking
- Node.js is event driven so it sleeps when there are no requests to process
- It is cross-platform
- Node.js can be used for desktop applications in addition to servers
- It is open-source
- It is lightweight and additional modules can be included as per requirement of an application
- Due to its popularity a number of external nodejs packages are available which can be of help in extending capabilites of an application
- Node.js is a javascript framework and uses javascript to build server side application, while it also supports language that transpiles to JavaScript, for example TypeScript and CoffeeScript
What Can Node.js Do?
- Node.js can generate dynamic page content
- Node.js can create, open, read, write, delete, and close files on the server
- Node.js can collect form data
- Node.js can add, delete, modify data in a database