Quick Contact


    Create Application in Node JS

    As node uses virtual machine VM (V8) or V8 engine to execute JavaScript as-:

    Create Application in Node JS

    This happens in Backend. Communication between Frontend and Backend takes place using HTTP request and response. In this setting of local server with node and run first code in node.

    Create Application in Node JS

    So in Node JS create a folder in which JavaScript file is created as server.js

    Now open the file in respective tool like notepad or notepad++.

    • First you have to require HTTP modem as-:
    • Var http = require (‘http’);

    • Now create a server including request and response and write a message in console log to check the creation of server as-:
    • Create Application in Node JS
    • Now in terminal run the code by writing “node ‘file name’” as-:
    >node server.js or >node server and press enter and the output is server created as-:
    Create Application in Node JS

    In this server port is 8080. Now access it to browser by typing localhost 8080 and output will be-:

    Create Application in Node JS

    So here Welcome to Node JS arrives means server is created. It is a basic application created in Node JS. You can also create function differently of request and response code and can call it in server as-:

    Create Application in Node JS

    Copyright 1999- Ducat Creative, All rights reserved.