Need Prize Money

    @universis/docnumbers
    TypeScript icon, indicating that this package has built-in type declarations

    1.1.11 • Public • Published

    @universis/docnumbers

    Universis api server default document numbering service

    Installation

    npm i @universis/docnumbers

    Usage

    Register DocumentNumberService in application services:

    # app.production.json
    
    "services": [
        ...,
        {
            "serviceType": "@universis/docnumbers#DocumentNumberService",
            "strategyType": "@universis/docnumbers#DefaultDocumentNumberService"
        }
    ]
    

    Add DocumentNumberSchemaLoader to schema loaders

    # app.production.json
    
    {
        "settings": {
            "schema": {
                "loaders": [
                    ...,
                    {
                        "loaderType": "@universis/docnumbers#DocumentNumberSchemaLoader"
                    }
                ]
            }
        }
    }
    

    Configuration

    Use settings/universis/docnumbers section to configure the usage of document verifier services:

     "docnumbers": {
        "origin": "https://api.example.com/",
        "rateLimit": {
            "windowMs": 300000
            "max": 5
        }
      }
    

    origin

    string

    A string which represents the remote address where document verifier service will be accessible by end-users.

    rateLimit

    object

    @universis/docnumbers uses express-rate-limit configuration for limiting the amount of requests against verification services. The default values are:

    {
        windowMs: 300000, // 5 minutes
        max: 20, // 20 requests
        standardHeaders: true,
        legacyHeaders: false
    }
    

    Install

    npm i @universis/docnumbers

    DownloadsWeekly Downloads

    6

    Version

    1.1.11

    License

    LGPL-3.0-or-later

    Unpacked Size

    268 kB

    Total Files

    78

    Last publish

    Collaborators

    • universis