From e6b95fbe3b21ad0f1d6ab3ad2f8948d1672ae337 Mon Sep 17 00:00:00 2001 From: Claude Code <[email protected]> Date: Fri, 23 Jan 2026 19:25:23 +0100 Subject: [PATCH] Add Node.js Hello World application with Docker support - Added index.js: Simple HTTP server on port 3000 - Added package.json: NPM configuration - Added Dockerfile: Multi-stage Docker build - Added .dockerignore: Exclude unnecessary files from build Ready for Coolify deployment via CI/CD pipeline. --- .dockerignore | 5 +++++ Dockerfile | 13 +++++++++++++ index.js | 13 +++++++++++++ package.json | 16 ++++++++++++++++ 4 files changed, 47 insertions(+) create mode 100644 .dockerignore create mode 100644 Dockerfile create mode 100644 index.js create mode 100644 package.json diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..98ff58a --- /dev/null +++ b/.dockerignore @@ -0,0 +1,5 @@ +node_modules +npm-debug.log +.git +.gitignore +README.md diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..4504474 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,13 @@ +FROM node:18-alpine + +WORKDIR /app + +COPY package.json . + +RUN npm install --production + +COPY . . + +EXPOSE 3000 + +CMD ["npm", "start"] diff --git a/index.js b/index.js new file mode 100644 index 0000000..857cf2b --- /dev/null +++ b/index.js @@ -0,0 +1,13 @@ +const http = require('http'); + +const PORT = process.env.PORT || 3000; + +const server = http.createServer((req, res) => { + res.writeHead(200, { 'Content-Type': 'text/plain' }); + res.end('Hello World from First Contact! 🚀\n'); +}); + +server.listen(PORT, '0.0.0.0', () => { + console.log(`Server running on port ${PORT}`); + console.log(`First Contact application ready!`); +}); diff --git a/package.json b/package.json new file mode 100644 index 0000000..02ac7ed --- /dev/null +++ b/package.json @@ -0,0 +1,16 @@ +{ + "name": "firstcontact", + "version": "1.0.0", + "description": "First Contact - Hello World Application", + "main": "index.js", + "scripts": { + "start": "node index.js", + "dev": "node index.js" + }, + "keywords": ["firstcontact", "hello-world"], + "author": "mikael.westoo", + "license": "MIT", + "engines": { + "node": ">=18.0.0" + } +}