Deploying the application using CLI
AdminJS Cloud Hosting comes with a CLI tool which you can use locally or inside your CI/CD to deploy your application.
$ npm i -g @adminjs/cloud-cli
@adminjs/cloud-clirelies on configuration file to be present in your source code. The default file name is
adminjs-cloud.jsonbut you can provide a custom file path using
--configoption in a CLI command.
include string A list of files/directories you wish to deploy.
Currently, AdminJS Cloud Hosting requires
startscript to be present in your
package.jsonfile. This is the command you use to start your application:
"start": "node app.js"
In the future, we plan to extend application's configuration so that you can provide a custom start command.
As of version
1.1.0the CLI only allows you to deploy your application.
@adminjs/cloud-cliyou must first request an application in Pricing page and generate an API Key & API Secret.
deploycommand allows you to deploy your source code. The CLI assumes your code is already built and whatever files you choose to
includein your configuration file are enough to start your application.
apiKey string required Your API Key
apiSecret string required Your API Secret
config string optional Path to your configuration file (relative to PWD)
$ adminjs-cloud deploy --apiKey=<string> --apiSecret=<string> --config=[string]