0.1.12 • Published 3 years ago

@manychat/gt-diagnostic-service v0.1.12

Weekly downloads
-
License
ISC
Repository
github
Last release
3 years ago

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"
}
0.1.12

3 years ago

0.1.11

3 years ago

0.1.10

4 years ago

0.1.9

4 years ago

0.1.8

4 years ago

0.1.7

4 years ago

0.1.6

4 years ago

0.1.5

4 years ago

0.1.4

5 years ago

0.1.3

6 years ago

0.1.2

6 years ago

0.1.1

6 years ago

0.1.0

6 years ago