From 3f6848eb105da83c7bc29500322e43e1ab57f698 Mon Sep 17 00:00:00 2001 From: Flatlogic Bot Date: Tue, 3 Feb 2026 13:15:32 +0000 Subject: [PATCH] Initial import --- app.js | 19 ++++++++++++++ index.html | 70 ++++++++++++++++++++++++++++++++++++++++++++++++++++ package.json | 13 ++++++++++ server.js | 20 +++++++++++++++ 4 files changed, 122 insertions(+) create mode 100644 app.js create mode 100644 index.html create mode 100644 package.json create mode 100644 server.js diff --git a/app.js b/app.js new file mode 100644 index 0000000..7809933 --- /dev/null +++ b/app.js @@ -0,0 +1,19 @@ +(function () { + var statusEl = document.getElementById("status"); + var metaEl = document.getElementById("meta"); + var btn = document.getElementById("action"); + + if (!statusEl || !metaEl || !btn) { + throw new Error("Missing required DOM elements."); + } + + var now = new Date(); + statusEl.textContent = "Status: JavaScript loaded."; + metaEl.textContent = "Loaded at " + now.toISOString(); + + btn.addEventListener("click", function () { + var clicks = Number(btn.getAttribute("data-clicks") || "0") + 1; + btn.setAttribute("data-clicks", String(clicks)); + btn.textContent = "Clicked " + clicks + (clicks === 1 ? " time" : " times"); + }); +})(); diff --git a/index.html b/index.html new file mode 100644 index 0000000..076ff9a --- /dev/null +++ b/index.html @@ -0,0 +1,70 @@ + + + + + + Zip Import Test + + + +
+ Zip Import +

It works.

+

This page is served from a ZIP import test project.

+

Status: waiting for JS...

+ +
+
+ + + diff --git a/package.json b/package.json new file mode 100644 index 0000000..1981237 --- /dev/null +++ b/package.json @@ -0,0 +1,13 @@ +{ + "name": "zip-import-test", + "version": "1.0.0", + "private": true, + "description": "Minimal Node app for ZIP import testing.", + "main": "server.js", + "scripts": { + "start": "node server.js" + }, + "dependencies": { + "express": "^4.18.2" + } +} diff --git a/server.js b/server.js new file mode 100644 index 0000000..3565dfa --- /dev/null +++ b/server.js @@ -0,0 +1,20 @@ +const path = require("path"); +const express = require("express"); + +const app = express(); +const port = Number(process.env.FRONT_PORT || process.env.PORT || 3000); +const rootDir = __dirname; + +app.use(express.static(rootDir)); + +app.get("/health", function (_req, res) { + res.status(200).send("ok"); +}); + +app.get("/", function (_req, res) { + res.sendFile(path.join(rootDir, "index.html")); +}); + +app.listen(port, function () { + console.log("zip-import-test listening on port", port); +});