In this node tutorial we will learn how to build Nodejs application using server side JavaScript programming.
NodeJs provides huge number of javascript library, which we can import in our JavaScript code and start using functionalities.
below is the example of how we can use http var http = require('http');
module to start a server in local environment.
var http = require('http'); http.createServer(function (req, res) { res.writeHead(200, {'Content-Type': 'text/html'}); res.end('Hello World! this is my new page cntent'); res.end('<h1>this is a test h1 tag</h1>'); }).listen(8080);
Above code will start the server in our local environment and create a html page with specified content, after running the above code, if you open http://localhost:8080
you will able to see the page and the content as written in above code.
Every single line of code you write in node application, is pure JavaScript, before you start learning NodeJs, you should have a basic idea of following two things:
Node.js is an open-source server side programming language and runtime environment built on Chrome's V8 JavaScript engine. Node provides an event driven, asynchronous and cross-platform runtime environment for building highly efficient server-side applications using JavaScript.
Here are few important things about NodeJs we must know before we start learning Node Development
Using NodeJs we can do following tasks
You can download Node.js from the official site: Nodejs.org, there are different types of installer, choose the right one for your operating system.
There are many big companies using Node.Js for their application development, Companies like Netflix, Linkedin, Medium, eBay, NASA, Trello, Uber, PayPal etc. are using Node.js, So as a Node development professional you have huge career scope
Before you can start with some real time node application development, you need to make sure that you have installed Node and setup the Terminal correctly , then learn following tasks step by step.
Nodejs runtime environment is designed for building scalable network applications; learn more about nodejs resources, community, latest release etc.