Skip to content

Migrate backend from .NET Core to Node.js - #1

Open
ghostyappzeta[bot] wants to merge 1 commit into
masterfrom
nodejs-backend
Open

Migrate backend from .NET Core to Node.js#1
ghostyappzeta[bot] wants to merge 1 commit into
masterfrom
nodejs-backend

Conversation

@ghostyappzeta

@ghostyappzeta ghostyappzeta Bot commented Feb 23, 2026

Copy link
Copy Markdown

This pull request was generated by @kiro-agent 👻

Comment with /kiro fix to address specific feedback or /kiro all to address everything.
Learn about Kiro autonomous agent


Summary

Migrates the EventMapr backend from C#/.NET Core to Node.js while preserving full API compatibility with the existing frontend.

Changes

  • New Node.js backend at src/EventMapr-node/
    • Express.js server for REST API and static file serving
    • SignalR-compatible WebSocket hub using ws package (maintains frontend compatibility without changes)
    • Configuration system supporting EVENTMAPR_CONFIG_PATH environment variable
    • Swagger UI documentation at /swagger
    • Docker support with Node.js 18 Alpine image

API Endpoints Preserved

  • GET / - Static frontend files
  • GET /api/configuration - Returns settings
  • POST /api/event - Accepts event and broadcasts to WebSocket clients
  • POST /api/event/Demo?count=N&eventClass=0|1 - Generates demo events
  • GET /swagger - Swagger UI documentation
  • WS /mapHub - SignalR-compatible WebSocket endpoint

Files Added

  • src/EventMapr-node/src/ - Server, app, hub, routes, config, utilities
  • src/EventMapr-node/config/default.json - Default configuration
  • src/EventMapr-node/public/ - Frontend files (copied from wwwroot)
  • src/EventMapr-node/Dockerfile - Docker container definition
  • src/EventMapr-node/package.json - Node.js dependencies

Usage

cd src/EventMapr-node
npm install
npm start
# Server runs on http://localhost:5000

Docker Usage

docker build -t eventmapr-node src/EventMapr-node
docker run -p 5000:5000 eventmapr-node

Notes

  • The original .NET Core backend is preserved for reference
  • The frontend works unchanged with the new backend (SignalR protocol compatibility maintained)

…PI, and Swagger docs

- Create Express server on port 5000 with static file serving from public/
- Implement SignalR-compatible WebSocket hub at /mapHub for real-time events
- Add REST API endpoints:
  - GET /api/configuration - Returns settings in camelCase format
  - POST /api/event - Broadcasts event to all WebSocket clients
  - POST /api/event/Demo - Generates random demo events
- Add Swagger documentation at /swagger endpoint
- Support EVENTMAPR_CONFIG_PATH env var for custom config location
- Copy wwwroot/ frontend files to public/ directory
- Add Dockerfile and .dockerignore for containerization
- Transform config keys from PascalCase to camelCase for frontend compatibility

Co-authored-by: Michael Landi <1298427+michaellandi@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants