2.0.3 • Published 2 years ago

@leismore/get_handler v2.0.3

Weekly downloads
1
License
AGPL-3.0-only
Repository
github
Last release
2 years ago

get_handler-function

A general HTTP-GET request handler (echo) for Node.js & Express.js applications. It sends HTTP 204 (means I am working) for any HTTP-GET request.

Donation

PayPal Donation

Motivation

Define a HTTP-GET handler to echo I am working message for testing purpose.

Behavior

When an API received a HTTP-GET request without any extra data, it should answer with HTTP 204 (means I am working).

Installation

npm install @leismore/get_handler

Test

npm test

Examples

import express = require('express');
import { get_handler } from '@leismore/get_handler';

let app  = express();
let port = 8080;

app.get('/', get_handler);

app.listen( port, () => console.log(`Example app listening on port ${port}!`) );

License

GNU Affero General Public License v3.0

Authors

2.0.3

2 years ago

2.0.2

2 years ago

2.0.1

3 years ago

2.0.0

3 years ago

1.0.0

4 years ago