block-quote On this pagechevron-down
server How to Host, Usingterminal CLILearn how to host your applications quickly and easily using one of our CLIs.
The Discloud CLI allows you to deploy and manage your applications directly from the command line, providing a fast and efficient way to interact with your app.
🔑 Windows Execution Policy (Only for Windows Users)
🛠️ What is Execution Policy?
The Execution Policy protects your system by limiting the execution of unsigned scripts. The RemoteSigned mode allows local scripts to run without signatures but requires a signature for scripts downloaded from the internet.
❓ How to Enable Script Execution
Open PowerShell as Administrator.
Run the following command.
Copy Set-ExecutionPolicy RemoteSigned - Scope CurrentUser Confirm the change by typing Y and pressing Enter.
Restart PowerShell and try running Discloud CLI commands again.
🔧 Installing the Discloud CLI
Prerequisite.
Ensure you have NodeJS installed on your system.
Install the CLI.
Copy npm install -g discloud-cli Reopen the terminal to apply the changes.
Verify Installation.
After installation, run the following command to verify if the CLI was installed correctly:
circle-check
If the CLI version is displayed, the installation was successful.
circle-info
To update the CLI, run the following command:
Copy npm update -g discloud-cli Login.
To access CLI functionalities, you need to log in with your Discloud credentials. Run the following command and paste your Discloud API Token :
circle-info
Official CLI Repository
The NodeJS CLI is an open-source project. You can contribute, report bugs, and suggest improvements in the official repository.
🚀 Deploying Your Application
Once installed and configured, you can deploy your application in just a few steps.
Preparing your project.
Ensure your project contains all required files:
Check the Languages Guide to make sure your project is properly structured.
Uploading your application.
To deploy your project, navigate to your application folder and run:
The CLI will automatically compress your project and upload it.
Once completed, your application will start running on Discloud.
circle-info
To check your app status, use:
📌 Tips & Tricks
✨ Using discloud init to Auto-Generate Configuration
Instead of manually creating the discloud.config file, you can generate it automatically using:
This command prompts you to enter basic configuration details (e.g., name, main file, RAM, etc).
It then generates the discloud.config file for you, making deployment easier.
📂 Using .discloudignore to Exclude Files
If you want to exclude certain files or directories from being uploaded, you can create a .discloudignore file in the root of your project.
❓ Still need help?
Check the FAQ Section or join our Discord Server arrow-up-right for support.
Last updated 2 months ago