download and use node.js NPM packages

How to Download and use Node.js NPM Packages

  Let first define a few terms before we go deep into Node.js NPM Packages tutorial. Define terms What is NPM? NPM stands for Node.js Package manager.NPM manages thousands of modules which are hosted in www.npmjs.com. Some packages are free to use while others are restricted.  Installing…

Node.js Url Module

How to use Node.js Url Module to route application using url.pathname

Node.js Url Module is used to split URL into readable parts which can be hostname,pathname etc.Its inbuilt Node.js module. Including Node.js Url Module To use url module add below code

http url routing using url.pathname Below code creates a http server that accepts  http requests…

Using Node.js File System Module

Node.js File System Module helps you to work with files on your computer or server.You can read, edit, write, create or rename files. To use file system you need to import them i.e var fs=require(‘fs’) Reading Files To read files on your computer we use…

url_node.js_module

  Using Node.js Http Module

As I mentioned earlier in Node.js Modules tutorial,Node.js has built in modules and Http module is one of them. This module is used to transfer data over hyper text transfer protocol(http). To use http module we need to include it in our script  using require…

node date function

Creating Node.js Modules

Modules are javascript libraries that can be used in developing an application.They are set of functions. Types of Modules 1.Built in modules-these are node.js modules that can be used without installing them.Example of these modules are:- http-makes node.js act like http server. https-makes node.js act…

Node.js hello world example

Getting Started with Node.js tutorial

Node.js is a Javascript framework that allows you to run javascript on server. Learning by examples. First of all make sure you have downloaded and installed node.js before getting started with this tutorial. Hello word node.js application. Code

How to  run above code First…