Skip to main content

Introduction

This guide covers deploying Express.js applications on Shard Cloud, from initial setup to production deployment.

Creating Your Project

Before starting, ensure you have Node.js and npm installed. Download from the official Node.js website.

Installing Express

Basic Express Application

Create an index.js file:
index.js
Port 80 is required for web applications on Shard Cloud.

Package.json Configuration

package.json

Shard Cloud Configuration

Create a .shardcloud file in your project root:
.shardcloud

Deploying

1

Prepare Your Files

Ensure you have: - index.js (or your entry file) - package.json - .shardcloud
2

Exclude Unnecessary Files

Remove before zipping: - node_modules/ - package-lock.json
3

Create ZIP Archive

Compress your project folder into a .zip file.
4

Upload to Shard Cloud

Go to Shard Cloud Dashboard and click “New app” to upload your project.

Additional Resources

For more information about Express, visit the official Express documentation.

Troubleshooting

  • Verify your MAIN file path is correct - Check that port 80 is used for web applications - Ensure all dependencies are in package.json
  • Confirm SUBDOMAIN is set in .shardcloud - Wait a few moments after deployment for DNS propagation