Skip to content

Commit

Permalink
node client server
Browse files Browse the repository at this point in the history
  • Loading branch information
Manishak798 committed Dec 23, 2023
1 parent c0d7a21 commit ef8b795
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions NodeJs/app.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
//this is my first node app
const number = 10;
if (number < 10) {
console.log('too small');
} else {
console.log('too large');
}
console.log(`My first node app🎉`);
const http = require("http");
const request = http.get('http://www.google.com', response => {
response.on('data', chunk => {
console.log(chunk.toString());
})
});
request.on('error', error => {
console.error('error message');
});

0 comments on commit ef8b795

Please sign in to comment.