Node Components
NodeJS has following 3 components which takes the platform to up and running:
- Importing required modules using require directory
- Creating server
- Read request and return response.
Following is the code snippet showing use of above components:

Workflow explanation of above snippet components:
Above Code shows that we have imported http directory using require module and stored in a variable. Then we have called method ceatreServer() on http instance with request and response as arguments to it.
To test its working visit localhost:1234 in your web-browser.