-
Notifications
You must be signed in to change notification settings - Fork 0
5. Server Setup and Modes
Once MinaMesh is installed, you can start the server in different modes depending on your use case. This section explains the available options, including enabling search transaction optimizations and running in playground mode.
To start MinaMesh, use the serve
command:
mina-mesh serve
By default, this command starts the server in standard mode with minimal configuration. However, you can modify its behavior using environment variables or command-line flags.
MinaMesh supports search transaction optimizations for faster query performance when working with large datasets in the Archive Node database. These optimizations rely on additional database features and must be explicitly enabled.
To apply the optimizations, use the following command:
mina-mesh search-tx-optimizations apply
This command creates additional tables, indexes, and triggers in the Archive Node database, improving the performance of /search/transactions
queries.
After applying optimizations, start the server with the --use-search-tx-optimizations
flag:
mina-mesh serve --use-search-tx-optimizations
This tells MinaMesh to utilize the optimized schema for transaction searches.
You can verify if optimizations are applied using:
mina-mesh search-tx-optimizations check
If you need to remove the optimizations, use:
mina-mesh search-tx-optimizations drop
MinaMesh includes a feature for serving an OpenAPI playground for exploring the API directly in your browser.
To enable the OpenAPI playground, start MinaMesh with the --playground
flag:
mina-mesh serve --playground
When this flag is present:
-
GET /
responds with an OpenAPI playground interface, allowing you to interact with the MinaMesh API endpoints directly. - This is useful for testing and exploring the API.
🗒️ Note: The
--playground
flag affects only theGET /
endpoint and does not change the behavior of other API endpoints.
mina-mesh serve
mina-mesh search-tx-optimizations apply
mina-mesh serve --use-search-tx-optimizations
mina-mesh serve --playground