[backend][nodejs] Initialize with Hello World

This commit is contained in:
koeberlue
2021-04-05 13:27:17 +02:00
parent 995824f0bf
commit 353822d6b1
3 changed files with 146 additions and 0 deletions

13
backend/nodejs/app.js Normal file
View File

@@ -0,0 +1,13 @@
const http = require('http');
const port = 3000;
const server = http.createServer((request, response) => {
response.statusCode = 200;
response.setHeader('Content-Type', 'text/plain');
response.end('Hello World');
});
server.listen(port, () => {
console.log(`Server listening on port ${port}`)
});