@ableron/express
TypeScript icon, indicating that this package has built-in type declarations

1.5.0 • Public • Published

@ableron/express

Build Status npm version Node.js Version

Express Middleware for Ableron Server Side UI Composition

Installation

npm i @ableron/express

Usage

import express from 'express';
import ableron from '@ableron/express';

const app = express();

app.use(
  ableron(
    // custom settings (optional)
    {
      fragmentRequestTimeoutMillis: 5000,
      fragmentRequestHeadersToPass: ['X-ACME-Test-Groups', 'X-Correlation-ID'],
      cacheVaryByRequestHeaders: ['X-ACME-Test-Groups'],
      statsAppendToContent: true
      // ...
    },
    // custom logger (optional). If no logger is provided, no logging happens at all
    yourLogger() || console
  )
);

Configuration

Configuration options see @ableron/ableron

Package Sidebar

Install

npm i @ableron/express

Weekly Downloads

19

Version

1.5.0

License

Apache-2.0

Unpacked Size

22.7 kB

Total Files

8

Last publish

Collaborators

  • ableron