Nuxt.js

JavaScript Framework

Nuxt.js Deployment Guide

Nuxt.js is supported by Alkimist for frontend deployments.

Vue Section

Nuxt.js is built on top of Vue.

You write Vue components (.vue files), and Nuxt adds routing, server rendering, and production deployment features around Vue.

In short:

  • Vue is the UI framework.
  • Nuxt.js is the full framework on top of Vue for app structure and deployment.

Project Requirements

  • A valid package.json
  • A build script in package.json (for example nuxt build or nuxt generate)
  • Your repository pushed to GitHub or GitLab

Folder Structure

A typical Nuxt project structure:

text
app.vue
nuxt.config.ts
package.json
pages/
  index.vue
components/
  Header.vue
layouts/
  default.vue
server/
  routes/
    up.get.ts
public/

Healthcheck (/up)

Nuxt should expose a healthcheck route at /up.

Create this file:

ts
// server/routes/up.get.ts
export default defineEventHandler(() => {
  return 'ok';
});

This route responds at:

text
/up

Deployment Notes

Before deploy:

  1. Commit and push your latest code to GitHub.
  2. Make sure your app builds successfully.
  3. Ensure /up exists and returns 200 OK.

Example package scripts

json
{
  "scripts": {
    "dev": "nuxt dev",
    "build": "nuxt build",
    "start": "nuxt start"
  }
}