We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent bcf36f4 commit 871cd34Copy full SHA for 871cd34
comments.js
@@ -1,2 +1,20 @@
1
+// Import the HTTP Module
2
+const http = require('http');
3
+
4
// 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
20
0 commit comments