1.1.1 • Published 5 years ago

@fabernovel/heart-server v1.1.1

Weekly downloads
-
License
MIT
Repository
gitlab
Last release
5 years ago

Description

Heart Server is an orchestrator of every other heart-* modules.

As an orchestrator, it allows to start webpage analysis. And it does so by exposing a small API.

Technically, it is a server that starts on 127.0.0.1 (port is customizable, default to 3000).

Example: if you install this package plus Heart Observatory, you will have an API that expose the /observatory endpoint. Requesting this endpoint will start a webpage analysis using the Mozilla Observatory service.

Installation

  1. Add the package to your project:
npm i @fabernovel/heart-server
  1. Optional Add the following environment variables:
# Port that the server will listen to
PORT=1234

# Express configuration: http://expressjs.com/en/advanced/best-practice-performance.html#set-node_env-to-production
NODE_ENV=production

Usage

Vanilla JS

const HeartServer = require('@fabernovel/heart-server');

HeartServer.default.start();

TypeScript

import HeartServer from '@fabernovel/heart-server';

HeartServer.start();
1.1.1

5 years ago

1.1.0

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago