From 5124690b03119717991acb2788ced0d0e6feb343 Mon Sep 17 00:00:00 2001 From: aitzol76 Date: Thu, 8 Apr 2021 11:41:31 +0200 Subject: [PATCH] ariketari dagokion index.js fitxategia --- index.js | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/index.js b/index.js index 268a541..04ba3b2 100644 --- a/index.js +++ b/index.js @@ -1,12 +1,9 @@ -const express = require('express'); -const app = express(); +const http = require('http'); -app.set('port', 8080); - -app.get('/', (req, res) => { - res.status(200).send('Hello World!!'); +const server = http.createServer(function(req, res){ + res.writeHead(200); + res.end('Hello World!!'); }); -app.listen(app.get('port'), () => { - console.log('Zerbitzaria martxan ' + app.get('port') + ' atakan'); -}); +server.listen(8080); +console.log('http zerbitzaria lanean 8080 atakan...'); \ No newline at end of file