Hello
This commit is contained in:
13
http/server.js
Normal file
13
http/server.js
Normal file
@@ -0,0 +1,13 @@
|
||||
const http = require("http");
|
||||
|
||||
const port = 18080;
|
||||
|
||||
const server = http.createServer((req, res) => {
|
||||
res.statusCode = 200;
|
||||
res.setHeader("Content-Type", "text/html");
|
||||
res.end("<h1>Hello, World!</h1>");
|
||||
});
|
||||
|
||||
server.listen(port, () => {
|
||||
console.log(`Server running at port ${port}`);
|
||||
});
|
||||
Reference in New Issue
Block a user