Working with a Git repository

We have cloned the Sample repository on our local machine. Now we will see how to work with the Git repository:

  1. Create a Node.js Hello World application that will create an HTTP server and respond to all requests on port 8080 with the string Hello World. Here is the sample code for the Node.js application:
var http = require("http"); 
 
http.createServer(function (request, response) { 
 
   // Send the HTTP header  
   // HTTP Status 200 OK 
   // Content Type is text/plain 
   response.writeHead(200, {'Content-Type': 'text/plain'}); 
    
   // Send response body as "Hello World" 
   response.end('Hello World\n'); 
}).listen(8080); 
 
// Print message 
console.log('Server running at http://127.0.0.1:8080/'); 
  1. Save the code in  main.js and add this ...

Get DevOps for Salesforce now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.