Here we describe how to deploy public static assets on a domain.
Create your ScaleDynamics account
You need a ScaleDynamics account to deploy. You can sign up here to create your account. Subscription is FREE, no credit card required.
Install ScaleDynamics SDK and start a session
If you haven’t installed the ScaleDynamics SDK, you need to add it as a dependency to your module:
npm install warp
Before using the SDK you need to enter a session. You have to use your ScaleDynamics credentials to be identified using:
npx warp login
Prepare the public assets to deploy
By default you have to locate your public assets in a
public directory. This directory can be inside a module, or in an empty directory.
Select project and environment to deploy
The deployment of a server module requires you to indicate in which project and which environment you want to deploy.
A project is a name that identifies a web site, a web app, a microservice or an API.
An environment is a name that identifies a cloud execution configuration to run modules. For example you can have 'pre-prod', 'demo', 'staging' or 'production' environments. Each one will have its own cloud resource configuration.
Select a project
A project identifies a web site, a web app, a microservice or an API.
If you need to create a new project use
npx warp project create yourProjectName
To select a project use
npx warp project select yourProjectName
Select an environment
If you need to create a new environment use
npx warp env create yourEnvName
To select an environment to use
npx warp env select yourEnvName
Setup services for the environment
Before deploying you need to enable the Static asset hosting service and assign cloud resources to run it. To do that, open the console, select the organization, the project and the environment. Then enable the Static asset hosting service and assign a cloud resource on the provider and the region of your choice.
After subscribing resources, you will see in the console your services configurations.
To deploy use the
deploy command when you are located at the root of directory of the module you want to deploy.
npx warp deploy
On the console you'll see what is going to be deployed and where.
See all options details in the
warp deploycommand line documentation.