Replace e2e node server with caddy

Which is already available in the devenv runtime image
This commit is contained in:
Andrey Antukh 2026-01-07 12:40:41 +01:00
parent 2c124c85c1
commit fe4033e1d2
3 changed files with 1 additions and 22 deletions

View File

@ -23,7 +23,6 @@
"build:app:main": "clojure -M:dev:shadow-cljs release main worker",
"build:app:worker": "clojure -M:dev:shadow-cljs release worker",
"build:app": "pnpm run clear:shadow-cache && pnpm run build:app:main && pnpm run build:app:libs",
"e2e:server": "node ./scripts/e2e-server.js",
"fmt:clj": "cljfmt fix --parallel=true src/ test/",
"fmt:clj:check": "cljfmt check --parallel=false src/ test/",
"fmt:js": "pnpx prettier -c src/**/*.stories.jsx -c playwright/**/*.js -c scripts/**/*.js -c text-editor/**/*.js -w",

View File

@ -80,7 +80,7 @@ export default defineConfig({
/* Run your local dev server before starting the tests */
webServer: {
timeout: 2 * 60 * 1000,
command: "pnpm run e2e:server",
command: "caddy file-server --root resources/public/ --listen :3000",
url: "http://localhost:3000",
reuseExistingServer: !process.env.CI,
},

View File

@ -1,20 +0,0 @@
import express from "express";
import compression from "compression";
import { fileURLToPath } from "url";
import path from "path";
const app = express();
const port = 3000;
app.use(compression());
const staticPath = path.join(
fileURLToPath(import.meta.url),
"../../resources/public",
);
app.use(express.static(staticPath));
app.listen(port, () => {
console.log(`Listening at 0.0.0.0:${port}`);
});