@manychat/flow-preview-service
Service for creating flow preview screenshots
Last updated 5 months ago by itoldya .
ISC · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install @manychat/flow-preview-service -g
SYNC missed versions from official npm registry.

flow-preview-service

Service for creating flow preview screenshots

Installation

Node 8 required

npm install @manychat/flow-preview-service -g

Install npm packages globally without sudo on Linux

Update to latest

npm update @manychat/flow-preview-service -g

Run

flow-preview-service --player-url https://manychat.com/flowPlayerPage?screenshot_mode=1 --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
--player-url [url]  flow player page URL, default value [https://dev.manychat.com/flowPlayerPage?screenshot_mode=1]
--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 /

make preview

POST /process
Content-Type: application/json
Payload: { 
    data: <SharedFlowData>,
    thumbnail: <bool>,
}

success response

Status: 200
{
    "success": true,
    "worker": {
        "name": "worker_4",
        "useCount": 1
    },
    "result": {
        "type": "image/png",
        "base64": "data:image/png;base64,iVBORw0KGgoAAAA.."
    }
}

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.data is required"
}

client

html interface http://localhost:8844/client/

Current Tags

  • 0.2.16                                ...           latest (5 months ago)

21 Versions

  • 0.2.16                                ...           5 months ago
  • 0.2.15                                ...           8 months ago
  • 0.2.14                                ...           8 months ago
  • 0.2.13                                ...           2 years ago
  • 0.2.12                                ...           2 years ago
  • 0.2.11                                ...           2 years ago
  • 0.2.10                                ...           2 years ago
  • 0.2.9                                ...           2 years ago
  • 0.2.8                                ...           2 years ago
  • 0.2.7                                ...           2 years ago
  • 0.2.6                                ...           2 years ago
  • 0.2.5                                ...           2 years ago
  • 0.2.4                                ...           2 years ago
  • 0.2.3                                ...           3 years ago
  • 0.2.2                                ...           3 years ago
  • 0.2.1                                ...           3 years ago
  • 0.2.0                                ...           3 years ago
  • 0.1.3                                ...           3 years ago
  • 0.1.2                                ...           3 years ago
  • 0.1.1                                ...           3 years ago
  • 0.1.0                                ...           3 years ago
Downloads
Today 1
This Week 1
This Month 6
Last Day 0
Last Week 1
Last Month 14
Dependencies (8)
Dev Dependencies (0)
None
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |