Skip to content

Commit

Permalink
Create index.js
Browse files Browse the repository at this point in the history
  • Loading branch information
sarathrajsrinivasan authored May 24, 2024
1 parent 6068fce commit 7521672
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions NodeJS/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
const http = require('http');
const port = process.env.PORT || 3000;

const server = http.createServer((req,res) => {
res.statusCode = 200;
const msg = 'Hello'
res.end(msg);
});

server.listen(port, () => {
console.log(`Server running on http://localhost:${port}/`);
});

0 comments on commit 7521672

Please sign in to comment.