@leismore/get_handler
v2.0.3
Published
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.
Downloads
2
Readme
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
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
- Kyle Chine (Init. Jan 15, 2020)