- Sep 28, 2018
- admin
- 0
Node.js Tutorials
Node.js is an open source server environment which uses asynchronous programming to create networking and server-side applications by running JavaScript applications on the server. Node.js is a cross-platform environment which means that it can run on various platforms like, Windows, Linux, Unix, Mac OS X, etc.
Node.js tutorials will help you learn the essentials of Node.js starting from the basics to an advanced level. These tutorials are broken down into sections, where each section contains a number of related topics that are packed with easy to understand explanations, real-world examples, useful tips, informative notes, and “points to remember” section.
These tutorials are designed for beginners and professionals who want to learn Node.js step by step.
Prerequisites
Basic knowledge of HTML, JavaScript and web application is recommended.
So let’s get started by clicking Next.
Download and Install Node.js for Windows:
- Download the latest version of Node.js from https://nodejs.org.
- Accept the terms of license agreement.
- Choose the location where you want to install the nodejs files.
- js is now ready to install.
The First Program:
- Create a Node.js file using a text editor like notepad and save it with a “.js” extension.
- Add code to the “.js” file.
CODE:
var http = require('http'); http.createServer(function (req, res) { res.writeHead(200, {'Content-Type': 'text/html'}); res.end('Hello Tech Tutorialz!'); }).listen(8081); Save the “.js” file.
- Try to access your computer on port 8081 through a web browser.
- The above code will display “Hello Tech Tutorialz!” on your computer screen.
Output:
Hello Tech Tutorialz!