Skip to main content

Introduction

This guide covers deploying Nuxt applications on Shard Cloud. Nuxt is a Vue.js framework for server-side rendering and static site generation.

Creating Your Project

Ensure you have Node.js and npm installed.

Creating a New Nuxt Project

npx nuxi init my-nuxt-app
cd my-nuxt-app
npm install

Development Server

npm run dev

Building Your Project

Build the production output:
npm run build
This creates the .output folder with the server and static files.

Shard Cloud Configuration

Create a .shardcloud file:
.shardcloud
DISPLAY_NAME=Nuxt App
DESCRIPTION=Nuxt.js Application
MAIN=.output/server/index.mjs
MEMORY=512
VERSION=recommended
SUBDOMAIN=my-nuxt-app
The main file for Nuxt 3 is .output/server/index.mjs after building.

Deploying

1

Build Your Application

Run npm run build to generate the .output folder.
2

Prepare Your Files

Ensure you have:
  • .output/ folder (after build)
  • package.json
  • .shardcloud
3

Exclude Unnecessary Files

Remove: node_modules/, .nuxt/, package-lock.json
4

Create ZIP Archive

Compress your project folder including the .output folder.
5

Upload to Shard Cloud

Go to Shard Cloud Dashboard and upload.

Alternative: Build on Deploy

If you prefer to build on the server:
.shardcloud
DISPLAY_NAME=Nuxt App
DESCRIPTION=Nuxt.js Application
LANGUAGE=node
MEMORY=1024
VERSION=recommended
SUBDOMAIN=my-nuxt-app
CUSTOM_COMMAND=npm run build && node .output/server/index.mjs
Building on deploy requires more memory. Use at least 1024MB.

Additional Resources

Visit the official Nuxt documentation for more information.

Troubleshooting

  • Ensure all dependencies are in package.json
  • Check for TypeScript errors
  • Increase memory if needed
Verify the .output folder was created and contains server/index.mjs.