Developing with the Nhost stack and Run services locally
--run-service path/to/run-service.toml[:overlay_name]
, for instance:
--run-service
flags are supported. You can pass as many as you need and they all will be added to your project. You can also add or remove Run services to an already running instance by re-running the command specifying the final list of --run-service
you want. Any missing service will be removed and any new one will be added.
The second thing you will notice is that one of the --run-service
flags contains the suffix :mysvc
while the other one doesn’t. If you add to the configuration path the suffix :overlay_name
the configuration overlay with name overlay_name
will be applied.
The last thing to notice in the screenshot is that the URLs include information on how to connect to the Run service (in the example used in this guide only one of the started services expose a port):
http://localhost:5000
while if you want to connect to the Run service from another service (i.e. another Run service or hasura) you can use http://run-bun-gen:5000
NHOST_RUN_SERVICE
passing comma-separated values. For
instance, the equivalent environment variable for this example would be
NHOST_RUN_SERVICE=../mysvc/nhost-run-service.toml:mysvc,../mysvc/nhost-run-service.toml
nhost run --run-service...
.env
file based on your environment variables configuration and secrets. For instance, imagine a service with the following configuration:
env
file for our service with the folllowing command:
http://hasura-service:8080/v1/graphql
to connect to hasura in production and in the CLI but when
running the service in the host machine using the env file we are using an overlay to change the
value to https://local.graphql.local.nhost.run/v1/graphql
. Refer to the network
configuration for more details.