This package has been deprecated

Author message:

Changed package name to @fabernovel/heart-cli

@fabernovel/heart-server
TypeScript icon, indicating that this package has built-in type declarations

1.1.1 • Public • Published

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();

Readme

Keywords

none

Package Sidebar

Install

npm i @fabernovel/heart-server

Weekly Downloads

2

Version

1.1.1

License

MIT

Unpacked Size

14 kB

Total Files

13

Last publish

Collaborators

  • thomasgiscos
  • gautierb
  • williamgoulois
  • cezarion
  • bastien.gatellier.fabernovel
  • arnaud.mombrial.npmjs
  • victorchabbert