An open source GUI for polyglot, a universal gRPC client
This is an open source project to allow easy debugging of gRPC services, and leverages polyglot. It is powered by Electron, react and redux.
Polyglot requires java runtime 1.8. If on mac use
brew update
brew cask install java
Or download from oracle.
Download the latest version from the releases tab.
- If you have no polyglot experience/setup consider reading through this readme.
- Polyglot by default looks to ~/.polyglot/config.pb.json for its configuration. Define settings here or override them in the UI.
- Note not all settings can be defined in the UI currently.
- Logs can be viewed from View/Toggle Developer Tools/Console.
- An example config might be (remember to insert the OAuth secret, path to refresh token, and update the proto discovery paths as appropriate):
{
"configurations": [
{
"name": "production",
"call_config": {
"use_tls": "true",
"oauth_config": {
"refresh_token_credentials": {
"token_endpoint_url": "https://auth.improbable.io/auth/v1/token",
"client": {
"id": "improbable_cli_client_go",
"secret": "{{INSERT CLIENT SECRET HERE}}"
},
"refresh_token_path": "{{INSERT PATH TO REFRESH TOKEN HERE}}"
}
}
},
"proto_config": {
"proto_discovery_root": "/Users/peteboothroyd/Projects/platform/proto",
"include_paths": [
"/Users/peteboothroyd/Projects/platform/go/src",
"/Users/peteboothroyd/Projects/platform/go/src/github.com/gogo/protobuf/protobuf",
"/Users/peteboothroyd/Projects/platform/go/src/github.com/grpc-ecosystem/grpc-gateway/third_party/googleapis"
]
}
}
]
}
- Polyglot is known to hang if authentication fails, causing the request to hang indefinitely. Cancel the request, get a new refresh token and try again.
- Text editors do not automatically resize. Reload the page (View -> Reload).
- No option to define whether to use TLS in UI
- No filtering of services/methods in UI
- Difficult to read service/method name
- Configuration setup is awkward and error prone
To get start clone the repo:
git clone https://github.com/peteboothroyd/Dragoman.git your-project-name
And then install dependencies.
$ cd your-project-name && npm install
Run these two commands simultaneously in different console tabs.
$ npm run hot-server
$ npm run start-hot
- OS X: Cmd Alt I or F12
- Linux: Ctrl Shift I or F12
- Windows: Ctrl Shift I or F12
See electron-debug for more information.
This boilerplate is included following DevTools extensions:
- Devtron - Install via electron-debug.
- React Developer Tools - Install via electron-devtools-installer.
- Redux DevTools - Install via electron-devtools-installer.
You can find the tabs on Chrome DevTools.
If you want to update extension versions, please set UPGRADE_EXTENSIONS
env, just run:
# For macOS
$ UPGRADE_EXTENSIONS=1 npm run dev
# For Windows
$ set UPGRADE_EXTENSIONS=1 && npm run dev
To package apps for the local platform:
$ npm run package
To package apps for all platforms:
First, refer to Multi Platform Build for dependencies.
Then,
$ npm run package-all
To package apps with options:
$ npm run package -- --[option]
To run the application without packaging run
$ npm run build
$ npm start
To run End-to-End Test
$ npm run build
$ npm run test-e2e