Deployment
Deploying a Toolpad Studio app is like deploying any other React/Node application.
Pre-requisites
This guide assumes that you have copied your project folder to the server, and all subsequent commands are run inside it.
Make sure to add the following scripts to your
package.json
"scripts": {
"dev": "toolpad-studio dev"
"build": "toolpad-studio build"
"start": "toolpad-studio start"
}
Install step
Install required depdencies via:
npm install
Build step
This command will create an optimized production build for the Toolpad Studio app and will output the generated files:
npm run build
Start step
Once the build has been made, you can deploy it to any service of your choice!
To serve the app once built, run:
npm run start
If you want to listen on a specific port you can change the start script to:
"start": "toolpad-studio start -p 1234"
Custom base path
Toolpad Studio applications can run under a custom base path. Use the --base
CLI parameter to set a base under which the Toolpad Studio application is hosted.
toolpad-studio dev --base /foo
Now the Toolpad Studio application is accessible under http://localhost:3000/foo
. The --base
parameter must be supplied to the build
command. A build always has one specific base path:
toolpad-studio build --base /foo
toolpad-studio start --base /foo
Detailed guides
Detailed, step-by-step instructions are available for the following services: