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. There are two ways to launch the embedded typegate
If you have not installed Meta CLI or you have downloaded the thin version, you can check this installation guide of the CLI.
1. dev
subcommand
You can start the embedded typegatxe easily with default configs using the following command.
meta dev
The above command can be a good gateway to get started and also for development purposes. But if you want more granular control, you can use the second approach.
2. typegate
subcommand
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
Run the instance
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.