Servicii pe docker cu diverse aplicatii: python, node, php, .net
This commit is contained in:
12
www/node_script.js
Normal file
12
www/node_script.js
Normal file
@@ -0,0 +1,12 @@
|
||||
const http = require("http");
|
||||
|
||||
const PORT = process.env.PORT || 8090;
|
||||
|
||||
const server = http.createServer((req, res) => {
|
||||
res.writeHead(200, { "Content-Type": "text/plain; charset=utf-8" });
|
||||
res.end("Salut! Node.js rulează pe portul " + PORT + "\n");
|
||||
});
|
||||
|
||||
server.listen(PORT, "0.0.0.0", () => {
|
||||
console.log(`Node server: http://0.0.0.0:${PORT}`);
|
||||
});
|
||||
Reference in New Issue
Block a user