4.0.0 • Published 1 year ago

@oada/formats-server v4.0.0

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

@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)
4.0.0

1 year ago

3.5.3

2 years ago

3.4.8

2 years ago

3.4.7

2 years ago

3.4.9

2 years ago

3.5.2

2 years ago

3.5.1

2 years ago

3.5.0

2 years ago

3.4.10

2 years ago

3.4.4

2 years ago

3.4.3

2 years ago

3.4.2

2 years ago

3.4.6

2 years ago

3.4.5

2 years ago

3.4.0

2 years ago

3.3.1

2 years ago

3.4.1

2 years ago

3.3.0

3 years ago

3.2.0

3 years ago

3.1.3

3 years ago

3.1.1

3 years ago

3.0.2

3 years ago

3.1.0

3 years ago

3.0.1

3 years ago

3.0.0

3 years ago

2.0.0

3 years ago

1.8.1

3 years ago

1.7.0

4 years ago

1.6.0

4 years ago

1.5.1

4 years ago

1.4.1

4 years ago