diff --git a/bun.lock b/bun.lock index 7c62e8d..2848d4d 100644 --- a/bun.lock +++ b/bun.lock @@ -5,11 +5,14 @@ "": { "name": "moshcode.sh", "dependencies": { + "@profullstack/footer": "latest", "express": "5.1.0", }, }, }, "packages": { + "@profullstack/footer": ["@profullstack/footer@0.2.1", "", { "peerDependencies": { "react": ">=18" }, "optionalPeers": ["react"], "bin": { "profullstack-footer": "bin/profullstack-footer.js" } }, "sha512-KHmKVwrlzCBrSAAJ4zobNFCxTg8VF0gvNMeAut00dX3+gbWCtk6eOwIR2AaqEC7smj6Aio6cIexzt/dUnv1McA=="], + "accepts": ["accepts@2.0.0", "", { "dependencies": { "mime-types": "^3.0.0", "negotiator": "^1.0.0" } }, "sha512-5cvg6CtKwfgdmVqY1WIiXKc3Q1bkRqGLi+2W/6ao+6Y7gu/RCwRuAhGEzh5B4KlszSuTLgZYuqFqo5bImjNKng=="], "body-parser": ["body-parser@2.3.0", "", { "dependencies": { "bytes": "^3.1.2", "content-type": "^2.0.0", "debug": "^4.4.3", "http-errors": "^2.0.1", "iconv-lite": "^0.7.2", "on-finished": "^2.4.1", "qs": "^6.15.2", "raw-body": "^3.0.2", "type-is": "^2.1.0" } }, "sha512-2cGmJupaNgg+QUwVLAucDuWuoMZ6EX9iHDRswZ5lsNYEmwPaRknMPCLZz07yTzVq/83p4o/wzbDZbBrTvGGTIw=="], diff --git a/data/commands.json b/data/commands.json index 0cfa540..1ac4828 100644 --- a/data/commands.json +++ b/data/commands.json @@ -244,6 +244,12 @@ "group": "hosting", "summary": "mint a short link on the pit — /f/ follows to your url" }, + { + "name": "deploy", + "aliases": [], + "group": "hosting", + "summary": "upload a folder to your Moshpit server — it opens at and .pit.world" + }, { "name": "games", "aliases": [ diff --git a/package.json b/package.json index f04c06e..977b808 100644 --- a/package.json +++ b/package.json @@ -13,6 +13,7 @@ "check": "bun scripts/sync-commands.mjs --check" }, "dependencies": { + "@profullstack/footer": "latest", "express": "5.1.0" }, "packageManager": "bun@1.4.0" diff --git a/src/server.mjs b/src/server.mjs index 645265a..608d6f6 100644 --- a/src/server.mjs +++ b/src/server.mjs @@ -1,5 +1,6 @@ import express from 'express'; import { randomBytes } from 'node:crypto'; +import { footerHtml } from '@profullstack/footer'; import { readFileSync } from 'node:fs'; import { resolve, dirname } from 'node:path'; import { fileURLToPath } from 'node:url'; @@ -76,12 +77,19 @@ export function createApp() { res.json({ status: 'ok', version: VERSION, commands: COMMANDS.commands.length }), ); - // The pit.world global footer, fetched server-side (cached 1 h, served stale - // or as nothing when pit.world is slow or down) into the - // slot every page's foot() leaves. Its