Build, emulate and develop cloud Node.js modules
In this page we describe how to build, emulate and develop a cloud Node.js module on our platform.
Install the SDK and start a session
If you don't have installed the SDK globally, 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
Note that if you don't have a ScaleDynamics account yet, you can ask here https://console.scaledynamics.com/auth/signup/. We provide a FREE plan for the community.
Requirements
We consider your Node.js module you want our platform to manage contains at least a package.json
and a main script (i.e. index.js
).
Your module is a standard Node.js one that can have other module dependencies. Local modules resources like config files, images, ... must be located within the module directory.
Build the module
Use build
command to build the module. You need to indicate which client module output to use and where to store it.
npx warp build --output node-module:../browser
See the output options in the
warp build
command line documentation.
Emulate the module
To emulate the module on your computer just use the emulator
command that will starts your module emulation.
npx warp emulator run
See all options details in the
warp emulator
command line documentation.
Development of the module with live reload
dev
command provides you a way to develop with live reload. It builds and starts an emulator, and at each change of your module code it rebuilds and restarts the emulator.
npx warp dev --output node-module:../browser
See all options details in the
warp dev
command line documentation.