Skip to main content

Introduction

This guide covers deploying Fastify applications on Shard Cloud. Fastify is a high-performance web framework for Node.js.

Creating Your Project

Ensure you have Node.js and npm installed. Download from nodejs.org.

Installing Fastify

Basic Fastify Application

Create an index.js file:
index.js
Always use host: '0.0.0.0' to ensure the server is accessible externally.

Package.json Configuration

package.json

Shard Cloud Configuration

Create a .shardcloud file:
.shardcloud

Deploying

1

Prepare Your Files

Ensure you have: - index.js - package.json - .shardcloud
2

Exclude Unnecessary Files

Remove: node_modules/, package-lock.json
3

Create ZIP Archive

Compress your project folder.
4

Upload to Shard Cloud

Go to Shard Cloud Dashboard and upload your project.

Additional Resources

Visit the official Fastify documentation for more information.

Troubleshooting

Ensure you’re binding to 0.0.0.0 instead of localhost or 127.0.0.1.
Check your logs in the dashboard for detailed error messages.