diff --git a/DEVELOPMENT.md b/DEVELOPMENT.md index 84992a3d32..fd25b70398 100644 --- a/DEVELOPMENT.md +++ b/DEVELOPMENT.md @@ -360,10 +360,10 @@ The development server runs on `http://localhost:8080` and will proxy all API ca #### Interactive development stack launcher tool -In order to easily launch development environments in different deployment contexts, this script configures and starts a development environment for The Things Stack, allowing users to choose between local and staging environments, enable branding, and configure cloud-hosted mock setups. You can launch it via: +In order to easily launch development environments in different deployment contexts, this mage target configures and starts a development environment for The Things Stack, allowing users to choose between local and staging environments, enable branding, and configure cloud-hosted mock setups. You can launch it via: ```bash -$ node tools/js/serve-dev-stack.js +$ tools/bin/mage dev:serveDevWebui ``` It will interactively guide you through the desired setup and launches the The Things Stack Enterprise as well as a frontend development server wia webpack. diff --git a/tools/js/serve-dev-stack.js b/tools/js/serve-dev-webui.js similarity index 99% rename from tools/js/serve-dev-stack.js rename to tools/js/serve-dev-webui.js index 288e044d5e..5197ae41cf 100644 --- a/tools/js/serve-dev-stack.js +++ b/tools/js/serve-dev-webui.js @@ -136,9 +136,6 @@ if (relevantSetEnvs.length > 0) { } envConfig += stagingConfig } - } else { - // Cypress setup - envConfig = baseConfig + localConfig } const envVars = envConfig diff --git a/tools/mage/dev.go b/tools/mage/dev.go index 7f8be171c6..cd0e903cb3 100644 --- a/tools/mage/dev.go +++ b/tools/mage/dev.go @@ -349,6 +349,13 @@ func (Dev) StartDevStack() error { return execGo(logFile, logFile, "run", "./cmd/ttn-lw-stack", "start", "--log.format=json") } +func (Dev) ServeDevWebui() error { + if mg.Verbose() { + fmt.Println("Starting the webui with interactive configs") + } + return sh.RunV("node", "tools/js/serve-dev-webui.js") +} + func init() { initDeps = append(initDeps, Dev.Certificates, Dev.InitDeviceRepo) }