Skip to main content

Introduction

This guide covers deploying Astro applications on Shard Cloud. Astro is a modern static site generator with optional server-side rendering.

Creating Your Project

Ensure you have Node.js (16+) and npm installed.

Creating a New Astro Project

Building Your Project

Build the production output:
This creates a dist/ folder with static files.

Serving Your Astro Site

Static Sites (Default)

For static Astro sites, use serve:
.shardcloud

SSR Mode

For server-side rendering with Node.js adapter:
  1. Install the Node adapter:
  1. Configure astro.config.mjs:
astro.config.mjs
  1. Shard Cloud config:
.shardcloud

Deploying

1

Build Your Application

Run npm run build.
2

Prepare Your Files

Ensure you have:
  • src/ folder
  • package.json
  • .shardcloud
  • astro.config.mjs
3

Exclude Unnecessary Files

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

Create ZIP Archive

Compress your project folder.
5

Upload to Shard Cloud

Go to Shard Cloud Dashboard and upload.

Additional Resources

Visit the official Astro documentation for more information.

Troubleshooting

Check for component syntax errors and ensure all dependencies are installed.
Verify the Node adapter is properly configured and the output mode is set to ‘server’.