πŸš€ Introduction

  • Before you begin, make sure you have Node.js and npm installed on your system. If you don’t have them yet, you can download them from the official Node.js website.
  • Next, you will need to create an account on Square Cloud, which can be done through the login page. You can use either your email or Discord, or both, to create an account.
  • Finally, you need to have an active paid plan on your account. You can view our plans and purchase one according to your needs here.

βš™οΈ Creating the squarecloud config file

Learn about: how to make the configuration file for Square Cloud.

The squarecloud.app file is a configuration file that will be used to configure your application; it will be used to define the name, description, version, main file, among other things.

πŸ–₯️ Preparing Your Node.js Project

πŸ“ Essential Configuration Files

When preparing your Node.js project for deployment on Square Cloud, ensure that you include your configuration file (squarecloud.app/.config) and the essential files of your application in a zip file.

The configuration (squarecloud.app/.config) file must be located in the root of the zip file. Otherwise, Square Cloud will not be able to find it during deployment.

πŸ—‘οΈ Files to Exclude Before Uploading

  • node_modules: This folder is not required to be sent as it will be created during the installation process in the production environment.
  • package-lock.json: This file is not necessary because the production environment will install dependencies based on package.json.

πŸ€” Why Exclude These Files?

There are several reasons to exclude node_modules and package-lock.json before uploading your project:

  1. Installation Consistency: Not sending the node_modules folder ensures that dependencies are installed by the production environment, resulting in a consistent build free from local system discrepancies.

  2. Updated Installations: The production environment will install the latest compatible versions of the dependencies listed in package.json, providing a clean start for your application.

  3. Reduced Upload Size: Leaving out these files decreases the size of your upload file, which speeds up the upload process and makes deployment more efficient.

By doing this, you can ensure that your Node.js application is optimally prepared and secure for deployment to Square Cloud.

πŸ“„ Required Files

Three files are required to host your Node project:

Square Cloud natively supports TypeScript, running your project through ts-node, but it is recommended to always compile to JavaScript since we are a production platform.

πŸ’‘ Troubleshooting

πŸ“€ Uploading Project to Square Cloud

After preparing your project files, you can now upload them to Square Cloud and host your project.

Access the Square Cloud Dashboard and upload your project files.

If you continue to experience any issues, please don’t hesitate to contact our support team.