Skip to main content

Embedded Typegate

The Meta_CLI comes with an embedded typegate packaged inside it. A typegate instance is where you deploy your typegraphs where any logic written in them is exposed via an HTTP or GraphQL endpoints. You can run an embedded typegate node from the terminal, but you first need to set a couple of environment variables which are needed to instantiate the typegate node.

Set the tg_admin_password and tg_secret environment variables. You can use the following command to configure a sample value for the variables and test the embedded typegate.

export tg_secret=a4lNi0PbEItlFZbus1oeH/+wyIxi9uH6TpL8AIqIaMBNvp7SESmuUBbfUwC0prxhGhZqHw8vMDYZAGMhSZ4fLw== tg_admin_password=password

If you have not installed Meta_CLI or you have downloaded the thin version, you can check this installation guide of the CLI.

Everything is setup to run the embedded typegate. Just run the following command below.

meta typegate

The typegate instance runs on port 7890 by default. You can check if the typegate node is running by accessing http://localhost:7890 in your browser.