commit 1b41c37a65b7888e97303094cc0263e99aeed031 Author: Space <64922620+Space-Banane@users.noreply.github.com> Date: Fri Jan 16 08:54:02 2026 +0100 first commit diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..f52e6f5 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +node_modules +pnpm-lock.yaml \ No newline at end of file diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..eaf099a --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,9 @@ +services: + everything-is-fine: + image: node:22 + working_dir: /app + volumes: + - ./:/app + command: sh -c "npm i -g pnpm && pnpm i && node index.js" + ports: + - "2000:3000" \ No newline at end of file diff --git a/index.js b/index.js new file mode 100644 index 0000000..c105dfe --- /dev/null +++ b/index.js @@ -0,0 +1,20 @@ +import express from 'express'; +import { render as render_cf_error_page } from 'cloudflare-error-page'; + +const app = express(); + +app.get("/", (_req, res) => { + res.status(200).send(render_cf_error_page({ + "title": "Web server is working", + "error_code": "200", + "more_information": { "hidden": true }, + "browser_status": { "status": "ok", "status_text": "Seems Working" }, + "cloudflare_status": { "status": "ok", "status_text": "Often Working", location: "Where ever you are" }, + "host_status": { "status": "ok", "location": _req.headers.host, "status_text": "Almost Working" }, + "error_source": "host", + "what_happened": "
This site is still working. And it looks great.
", + "what_can_i_do": "Visit the site before it crashes someday.
" + })); +}); + +app.listen(3000); diff --git a/package.json b/package.json new file mode 100644 index 0000000..40fde91 --- /dev/null +++ b/package.json @@ -0,0 +1,6 @@ +{ + "dependencies": { + "express": "^5.2.1", + "cloudflare-error-page": "^0.1.0" + } +}