4.0.0 • Published 7 months ago

@fabernovel/heart-api v4.0.0

Weekly downloads
-
License
MIT
Repository
github
Last release
7 months ago

Description

Heart API is a runner module of Heart, which exposes an HTTP API that starts an analysis when it is requested.

Note that you must install an analysis module too, to have a minimum viable installation of Heart.

Read more about the description and design of Heart.

Usage

  1. Install the package and an analysis module, for example Heart GreenIT

    npm install @fabernovel/heart-api @fabernovel/heart-greenit

    If you are using Yarn, npm < 7 or PNPM < 8, you also have to install Heart CLI (which is automatically installed in more recent versions of these packages managers):

    npm install @fabernovel/heart-cli
  2. Start the server

    npx heart api

    You now have an HTTP server listening to 127.0.0.1:3000, with a /greenit endpoint where you could POST your analysis configuration (JSON-formatted) to start an analysis.

    You can change the default port with the --port option, and specify HTTP CORS headers with the --cors one.

  3. Start an analysis

    POST /greenit
    Content-type: application/json
    {
      "config": {
        "url": "https://www.fabernovel.com"
      }
    }

    The analysis configuration set with the request's body follows the JSON format, and depends of the analysis module; read their README.

4.0.0-alpha.9

10 months ago

4.0.0-alpha.7

10 months ago

4.0.0-alpha.8

10 months ago

4.0.0-alpha.6

10 months ago

4.0.0

7 months ago

4.0.0-alpha.5

11 months ago

4.0.0-alpha.3

1 year ago

4.0.0-alpha.4

1 year ago

3.2.0

1 year ago

3.1.1

2 years ago

3.1.0

4 years ago

3.0.1

5 years ago

3.0.0

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago