Skip to content

Latest commit

Β 

History

History
49 lines (34 loc) Β· 1.19 KB

File metadata and controls

49 lines (34 loc) Β· 1.19 KB

πŸš€ Module: Node.js Multi Container

Technology Stack:

  • Node.js

🎯 Scenario

This project reimplements multi container using Node.js and Express. It exposes a single endpoint that returns a localized greeting with an ISO-8601 timestamp appended, mirroring the original Quarkus behaviour.


Prerequisites

  • Node.js 22
  • Node.js 24
  • npm

🐾 Guided Walkthrough

  1. Installation
npm install
  1. Running the Tests
npm test
  1. Starting the Service
npm start

The server listens on port 8080 by default. Override with the PORT environment variable if needed.

  1. HTTP Endpoint
  • GET /helloworld-by-language – Responds with a greeting string such as hello world @ 2024-06-01T12:34:56.000Z.
  1. Configuration Environment variables provide the same configurability as the Quarkus version:
  • TRANSLATION_DEFAULT_LANGUAGE (default: EN) – Two-letter code used to choose the greeting.
  • TRANSLATION_FILE (default: translations.json) – File located in the resources/ directory that contains the greeting map.
  • PORT (default: 8080) – Port for the HTTP server.

All translations are stored in resources/translations.json