From 3c0da2e91f80ccd65d4bc21aa1bf7281faf54f9b Mon Sep 17 00:00:00 2001 From: Sam Hadow Date: Wed, 5 Feb 2025 16:39:11 +0100 Subject: [PATCH] makefile --- Makefile | 10 ++++++++++ src/app.js | 9 ++++++--- 2 files changed, 16 insertions(+), 3 deletions(-) create mode 100644 Makefile diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..4689cfd --- /dev/null +++ b/Makefile @@ -0,0 +1,10 @@ + +run: clean build + podman run --replace -dt -p 3333:3333 --name=e2ee e2ee-messaging-service:latest +build: + podman build -t e2ee-messaging-service . +test: + curl http://localhost:3333 + podman logs e2ee +clean: + podman rm -f e2ee diff --git a/src/app.js b/src/app.js index 25496b9..55751dc 100644 --- a/src/app.js +++ b/src/app.js @@ -1,8 +1,11 @@ const express = require('express') const app = express() -app.get('/', function(request,result){ +const port = 3333 + +app.get('/', (request, result) => { result.send('Hello World!') }) -app.listen(3333,"127.0.0.1",function(){ - console.log('hello world') + +app.listen(port, () => { + console.log(`App listening on port ${port}`) })