gt-diagnostic-service
Service for getting diagnostic data for growth tools widgets
Installation
npm install @manychat/gt-diagnostic-service -g
Install npm packages globally without sudo on Linux
Update to latest
npm update @manychat/gt-diagnostic-service -g
Run
gt-diagnostic-service --debug
Options
-V, --version output the version number
--max <n> maximum number of workers
--min <n> minimum number of workers
--port <n> listening port
--max-uses <n> maximum number of times a worker can be reused
--debug enable debug logging
-h, --help output usage information
--acquire-timeout-millis <n> max milliseconds an acquire call will wait for a resource before timing out
API
stats
GET /
get diagnostic data
POST /process
Content-Type: application/json
Payload: {
url: <string>,
widget: <WidgetDataObject>,
}
success response
Status: 200
{
"success": true,
"worker": {
"name": "worker_4",
"useCount": 1
},
"result": {
"spec": {
"main_script_info": [
"https://manychat.com/108199/assets/js/widget.js?924582371689"
],
"fb_sdk_info": [
"https://connect.facebook.net/en_US/sdk.js"
]
}
}
}
error response
Status: 500
{
"success": false,
"worker": {
"name": "worker_4",
"useCount": 1
},
"messages": [
{type: "console", msg: [,…]},
{type: "requestfailed", msg: [,…]},
{type: "pageerror", msg: [,…]},
],
"error": "Something went wrong"
}
Status: 400
{
"success": false,
"error": "body.url is required"
}