pambda-404

0.0.2 • Public • Published

pambda-404

Render 404 page.

Installation

npm i pambda-404 -S

Usage

import { compose, createLambda } from 'pambda';
import { render404 } from 'pambda-404';

export const handler = createLambda(
  compose(
    render404()
  )
);

render404(options)

  • options.statusCode
    • A integer of the HTTP response status code.
    • Default: 404
  • options.headers
    • An object of the HTTP response headers.
    • Default: { 'Content-Type': 'text/plain' }
  • options.body
    • A string of the HTTP response body.
    • Default: "Not found"

License

MIT

Readme

Keywords

Package Sidebar

Install

npm i pambda-404

Weekly Downloads

0

Version

0.0.2

License

MIT

Unpacked Size

1.63 kB

Total Files

3

Last publish

Collaborators

  • nak2k