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

    1.7.0 • Public • Published

    @OADA/formats-server

    This package is a library for handling OADA formats in HTTP servers (currently supports express and fastify).

    Installation

    yarn add @oada/formats-server

    Usage

    It will set relevant HTTP headers for known OADA formats. If it encounters an unknown format, it leaves the headers alone.

    Express

    // Import the middleware version
    import { middleware:formats } from '@oada/formats-server';
    
    // Must be `use`d _after_ the `Content-Type` is set to work properly
    app.use(formats())

    Fastify

    // Import the fastify plugin
    import { plugin:formats } from '@oada/formats-server';
    
    fastify.register(formats)

    Install

    npm i @oada/formats-server

    DownloadsWeekly Downloads

    10

    Version

    1.7.0

    License

    MIT

    Unpacked Size

    13.4 kB

    Total Files

    23

    Last publish

    Collaborators

    • sanoel
    • serviopalacios
    • aultac
    • awlayton
    • oadao
    • tarakawa
    • cyrusbowman
    • abalmos