nma.sh/ docs

Static Sites, JS & Frameworks

Deploy a single JavaScript file, a static HTML/CSS/JS folder, or a built framework directory—over Remote MCP or standard SSH.

Single-file JavaScript app

Use either serve(req => ...) or standard Workers-style export default { fetch(request) }:

js
// app.js
serve(req => {
  const url = new URL(req.url);
  if (url.pathname === "/api/time") {
    return Response.json({ now: new Date().toISOString() });
  }
  return new Response("<h1>Hello from nma.sh</h1>", {
    headers: { "content-type": "text/html; charset=utf-8" }
  });
});

Deploy over SSH (or pass source to the deploy MCP tool):

sh
ssh nma.sh deploy myapp --json < app.js

Omit myapp to auto-generate a name. Every deploy compiles, snapshots, probes the first request, and returns the live HTTPS URL.

Static websites & SPAs

A folder with index.html and no app.js is compiled as a pure static site—served directly from the edge with ETag, Range, gzip/Brotli compression, and pretty URLs (/about serves /about.html).

sh
tar czf - -C ./dist . | ssh nma.sh deploy mysite --json

Over Remote MCP, pass a files object directly to the deploy tool:

json
{
  "app": "mysite",
  "files": {
    "index.html": "<!doctype html><h1>Hello</h1>",
    "style.css": "body { font-family: monospace; }",
    "_redirects": "/* /index.html 200"
  }
}

_redirects and _headers

Frameworks (Vite, Astro, SvelteKit, Hono, Next.js, Nuxt)

Install the optional local CLI (verifies SHA-256 checksums automatically) to pack multi-file apps and frameworks or run local previews:

sh
curl -fsSL https://nma.sh/dl/install.sh | sh
nanovm dev ./app.js              # local preview
nanovm pack . | ssh nma.sh deploy myapp --json

Static framework outputs (like Vite dist/ or Astro static builds) don't even need the CLI—just pipe the build folder with tar.

Logs, rollback & deletion