mirror of
https://github.com/The-Art-of-Hacking/h4cker.git
synced 2024-10-01 01:25:43 -04:00
Create server.js
This commit is contained in:
parent
56d9bc9aef
commit
5c52f16bda
14
docker-and-k8s-security/docker/server.js
Normal file
14
docker-and-k8s-security/docker/server.js
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
const http = require('http');
|
||||||
|
|
||||||
|
const hostname = '0.0.0.0';
|
||||||
|
const port = 8080;
|
||||||
|
|
||||||
|
const server = http.createServer((req, res) => {
|
||||||
|
res.statusCode = 200;
|
||||||
|
res.setHeader('Content-Type', 'text/plain');
|
||||||
|
res.end('Hello from node.js!');
|
||||||
|
});
|
||||||
|
|
||||||
|
server.listen(port, hostname, () => {
|
||||||
|
console.log(`Server running at http://${hostname}:${port}/`);
|
||||||
|
});
|
Loading…
Reference in New Issue
Block a user