Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/tknf/node-header-helpers
A generic, framework-independent string helper for headers.
https://github.com/tknf/node-header-helpers
Last synced: 8 days ago
JSON representation
A generic, framework-independent string helper for headers.
- Host: GitHub
- URL: https://github.com/tknf/node-header-helpers
- Owner: tknf
- License: mit
- Created: 2022-05-28T04:01:08.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2022-05-28T04:02:06.000Z (over 2 years ago)
- Last Synced: 2024-09-22T00:42:44.342Z (about 2 months ago)
- Language: TypeScript
- Size: 32.2 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# @tknf/node-header-helpers
## Get Started### Install
```bash
yarn add @tknf/node-header-helpers
# or
npm install --save @tknf/node-header-helpers
```### Use on express
```js
import express from "express";
import { getContentTypeHeader, TextHtml } from "@tknf/node-header-helpers";const app = express();
app.get("/", async (req, res) => {
res.set(getContentTypeHeader(), TextHtml());
return res.status(200).send(`Hello world!`);
});
```