feat(client): test mount from form

This commit is contained in:
Nicolas Meienberger
2025-09-03 21:16:44 +02:00
parent 0c0a3b8581
commit ca4bd4a619
5 changed files with 78 additions and 16 deletions

View File

@@ -13,11 +13,9 @@ export const generalDescriptor = (app: Hono) =>
info: {
title: "Ironmount API",
version: "1.0.0",
description: "API for managing Docker volumes",
description: "API for managing volumes",
},
servers: [
{ url: "http://localhost:3000", description: "Development Server" },
],
servers: [{ url: "http://localhost:3000", description: "Development Server" }],
},
});
@@ -58,9 +56,7 @@ const socketPath = "/run/docker/plugins/ironmount.sock";
fetch: app.fetch,
});
console.log(
`Server is running at http://localhost:8080 and unix socket at ${socketPath}`,
);
console.log(`Server is running at http://localhost:8080 and unix socket at ${socketPath}`);
})();
export type AppType = typeof app;

View File

@@ -19,6 +19,7 @@ const mount = async (config: BackendConfig, path: string) => {
return new Promise<void>((resolve, reject) => {
exec(cmd, (error, stdout, stderr) => {
console.log("Mount command executed:", { cmd, error, stdout, stderr });
if (error) {
console.error(`Error mounting NFS volume: ${stderr}`);
return reject(new Error(`Failed to mount NFS volume: ${stderr}`));