{"id":18720821,"url":"https://github.com/chevp/arcane-horizon-nodejs","last_synced_at":"2026-05-06T18:34:38.121Z","repository":{"id":246826661,"uuid":"822264247","full_name":"chevp/arcane-horizon-nodejs","owner":"chevp","description":"TypeScript NodeJS Backend Sample for Arcane Horizon.","archived":false,"fork":false,"pushed_at":"2025-01-12T11:44:33.000Z","size":457,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-30T09:43:22.844Z","etag":null,"topics":["json","nodejs","rest","typescript"],"latest_commit_sha":null,"homepage":"","language":"HTML","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/chevp.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2024-06-30T18:41:18.000Z","updated_at":"2025-01-12T18:13:09.000Z","dependencies_parsed_at":null,"dependency_job_id":"7f2b39a8-0693-42ff-98fb-49bed72ad13a","html_url":"https://github.com/chevp/arcane-horizon-nodejs","commit_stats":null,"previous_names":["chevp/nodejs-backend-sample","chevp/arcane-horizon-nodejs"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/chevp/arcane-horizon-nodejs","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chevp%2Farcane-horizon-nodejs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chevp%2Farcane-horizon-nodejs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chevp%2Farcane-horizon-nodejs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chevp%2Farcane-horizon-nodejs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/chevp","download_url":"https://codeload.github.com/chevp/arcane-horizon-nodejs/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chevp%2Farcane-horizon-nodejs/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":271113419,"owners_count":24701609,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-19T02:00:09.176Z","response_time":63,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["json","nodejs","rest","typescript"],"created_at":"2024-11-07T13:32:42.966Z","updated_at":"2026-05-06T18:34:38.115Z","avatar_url":"https://github.com/chevp.png","language":"HTML","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Arcane Horizon NodeJS Backend\n\nThis project is the backend server for the Arcane Horizon system, built using **Node.js** and **TypeScript**. It provides services registration, a simple service registry, and serves static files for a service list interface. This backend listens on port `3000` and exposes several routes for managing and displaying services.\n\n## Features\n\n- **Service Registry**: Register services by name and port.\n- **Service List**: Display the list of registered services.\n- **Static Files**: Serves static HTML and CSS files to render a service list page.\n- **Error Handling**: Responds with 404 for unrecognized routes.\n\n## Requirements\n\n- **Node.js** (\u003e=14.x)\n- **npm** (\u003e=6.x)\n\n## Setup\n\n### 1. Clone the repository:\n\n```bash\ngit clone https://github.com/chevp/arcane-horizon-nodejs.git\ncd arcane-horizon-nodejs\n```\n\n### 2. Install dependencies:\n\n```bash\nnpm install\n```\n\n### 3. Start the server:\n\n```bash\nnpm start\n```\n\nThe server will start listening on port `3000`. You can access the API at `http://localhost:3000`.\n\n## API Endpoints\n\n### 1. **GET /**\n\n- **Description**: Welcome message.\n- **Response**: `Welcome to Node.js and TypeScript!`\n\n### 2. **GET /registry**\n\n- **Description**: Serves the static file `index.html`.\n- **Usage**: Access via `http://localhost:3000/registry`.\n\n### 3. **GET /register**\n\n- **Description**: Register a service by providing its name and port as query parameters.\n- **Usage**:\n  ```bash\n  http://localhost:3000/register?name=service_name\u0026port=1234\n  ```\n- **Response**:\n  - Success: `{\"error\": false, \"status\": 200, \"message\": \"service name=service_name port=1234 successfully registered!\"}`\n\n### 4. **GET /services**\n\n- **Description**: Lists all registered services.\n- **Response**: Returns an array of registered services in JSON format.\n  \n### 5. **GET /service-list.html**\n\n- **Description**: Serves the `service-list.html` file containing a static list of services.\n  \n### 6. **Static File Endpoints**:\n\n- **/style.css**: Serves the `style.css` file for the service list page.\n- **/font-awesome-4.3.0/**: Serves Font Awesome files for icons.\n\n### 7. **GET /404**\n\n- **Description**: Any unrecognized route will return a 404 error.\n- **Response**:\n  ```json\n  {\n    \"error\": true,\n    \"status\": 404,\n    \"message\": \"Not Found\"\n  }\n  ```\n\n## Folder Structure\n\n```\n├── index.html                # Main static HTML file served at /registry\n├── service-list.html         # Static HTML page showing registered services\n├── style.css                 # CSS file for service list styling\n├── font-awesome-4.3.0/       # Font Awesome assets for icons\n├── src/                      # Source code\n│   ├── server.ts             # Main backend logic\n└── README.md                 # This README file\n```\n\n## Development\n\nTo develop with live reloading, you can use tools like `nodemon` or `ts-node-dev`.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchevp%2Farcane-horizon-nodejs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fchevp%2Farcane-horizon-nodejs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchevp%2Farcane-horizon-nodejs/lists"}