Skip to content

Commit 871cd34

Browse files
Copilot third commit
1 parent bcf36f4 commit 871cd34

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

comments.js

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,20 @@
1+
// Import the HTTP Module
2+
const http = require('http');
3+
14
// Create web server
5+
const server = http.createServer((req, res) => {
6+
// Set the response header content type
7+
res.writeHead(200, {'Content-Type': 'text/plain'});
8+
9+
// Write the response content
10+
res.end('Hello, world! This is your web server running.');
11+
});
12+
13+
// Define the port number
14+
const port = 3000;
15+
16+
// Start the server
17+
server.listen(port, () => {
18+
console.log(`Server running at http://localhost:${port}/`);
19+
});
220

0 commit comments

Comments
 (0)