Develop using a portal

Develop code locally with remote dependencies using a long-living tunnel manager
The Portal is a long-living process that runs in the background and manages all the tunnels between your local machine and the remote environment.
Using an external process to manage the tunnels allows you to develop services faster, since you don't need to recreate the tunnel every time you run env develop.
To start working with the Portal:
  • Run the following command on a terminal window: veloctl env portal After running the Portal command, you will see the following messages in the terminal:
[VELOCTL] Starting a long-living portal to manage connections to the remote environment 'excited-mandroid'...
[VELOCTL] Keep the portal (pid 2866) running in the background while you develop and debug your application.
  • While the Portal process is running, keep it open in the background and run: env develop --attach in another terminal window.
veloctl env develop --attach --service service-name
Please note that env develop --attach does not accept -- <cmd> as an input parameter.
This Portal process will create a .env file in your working directory with the necessary environment variables for Velocity. If you already have such a file, it will be overwritten, so make sure you run the command from the proper folder.
The env develop --attach command will create a tunnel for the selected service and load any relevant environment variables into your local development environment.
Now, you can develop your service locally by starting your application. As long as you keep the tunnel open, your application can be tested against your remote environment.
Using env develop --attach allows you to continuously start and stop your application without recreating the tunnel. Thus, saving you time and providing you with a faster feedback loop.
  • To finish developing and close the tunnel, run:
veloctl env develop detach --service website
The 'detach' command will close the opened tunnel for the selected service.