From 6e44b5a12c69d53a706b11f2bb8855970805fa7c Mon Sep 17 00:00:00 2001 From: Bubbles The Dev <152947339+KernFerm@users.noreply.github.com> Date: Mon, 11 Nov 2024 15:46:16 -0500 Subject: [PATCH] Update app.js Signed-off-by: Bubbles The Dev <152947339+KernFerm@users.noreply.github.com> --- app.js | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/app.js b/app.js index 3383056..caa9e9d 100644 --- a/app.js +++ b/app.js @@ -1,12 +1,12 @@ -const http = require('http'); -const port = 3000; +// app.js +const express = require('express'); +const app = express(); +const port = 9090; -const requestHandler = (req, res) => { - res.end('Hello, World from Docker!'); -}; - -const server = http.createServer(requestHandler); +app.get('/', (req, res) => { + res.send('Hello, World! from bubblesthedev'); +}); -server.listen(port, () => { - console.log(`Server running at http://localhost:${port}`); +app.listen(port, () => { + console.log(`App listening on port ${port}`); });