Nuxt

Publique seu app Nuxt

Nuxt 3's default build target is a Node server, not static files — so the command that gets you a folder of HTML isn't the one in the getting-started guide. generate is the one you want.

steps
  1. 01

    Run generate, not build

    "npm run build" produces a Node server (".output/server"). "npm run generate" pre-renders every route to static HTML instead — that's the one this host needs.

  2. 02

    Find the output folder

    Nuxt 3 writes static output to ".output/public". If you're still on Nuxt 2, "nuxt generate" writes to "dist" instead.

  3. 03

    Publique

    Execute "npx harvis deploy .output/public" a partir da raiz do seu projeto. Sem configuração e sem login para esta primeira publicação — você recebe um URL ao vivo imediatamente, mais um link privado de reivindicação para vincular o site a uma conta gratuita quando quiser.

Publique Nuxt com um comando

Compile seu projeto e entregue a pasta de saída ao harvis. Nenhuma conta necessária para a primeira publicação — você recebe um link ao vivo e um link privado de reivindicação para gerenciá-lo depois.

terminal
npm run generate
npx harvis deploy .output/public

Prefere arrastar arquivos em vez de usar o terminal? Compile o projeto e solte a pasta de saída aqui para publicá-la da mesma forma.

git hook

Deploy Nuxt on every git push

The command above is one you will run again after every change. A git hook runs it for you: this one already points at .output/public, the folder Nuxt builds into.

The folder holding the finished site. "." is the repo root, which is right for hand-written HTML; a static-site generator writes somewhere else.

pre-push fires on every branch and every remote, so a feature branch would publish over your live site. With this on, a push from anywhere else exits early and goes through untouched.

in your repo root
cat > .git/hooks/pre-push <<'EOF'
#!/bin/sh
set -e
npm run generate
harvis deploy .output/public
EOF
chmod +x .git/hooks/pre-push

The options, the gotchas and how to share a hook with your team are on the git hook page.

Perguntas sobre publicar Nuxt

I ran npm run build by mistake — what changes?

That produced a ".output/server" folder meant to run under Node — it has no index.html and won't serve as static files. Run "npm run generate" instead; it pre-renders the same app to ".output/public".

Do dynamic routes and Nuxt's server API routes work?

Page routes work if Nuxt can enumerate them at generate time (static or with a "nitro.prerender.routes" list for dynamic segments). API routes under "server/api" need a server to run and won't work here — call an external API from the client instead.

Publicar um app Nuxt no harvis é realmente gratuito?

Sim, sem precisar de cartão. Os limites gratuitos são 500 arquivos e 50 MB por site, o que cobre um build estático de Nuxt com folga. Sites publicados não expiram — eles ficam no ar até você excluí-los.

Posso usar meu próprio domínio com o site Nuxt publicado?

Todo site recebe um endereço harvis.page gratuito, e você pode escolher seu próprio subdomínio pelo painel depois de reivindicá-lo — meu-app.harvis.page em vez de um aleatório. Apontar um domínio que você já possui (como minhaloja.com) para o site ainda não é suportado.

Qual a diferença entre isso e publicar Nuxt no Vercel ou Netlify?

Vercel e Netlify giram em torno de conectar um repositório Git e rodar seu build nos servidores deles, com um painel para configurar tudo. O harvis pula tudo isso: você compila localmente (ou no seu próprio CI), executa um único comando da CLI apontando para a pasta de saída e recebe um link — sem configurar projeto nenhum, e sem precisar de conta até você querer manter o site.

other frameworks

Vai publicar outra coisa?

A receita é a mesma em todos os casos — compile e depois npx harvis deploy na saída.