@tknf/node-header-helpers
v0.1.0
Published
A generic, framework-independent string helper for headers
Downloads
1
Readme
@tknf/node-header-helpers
Get Started
Install
yarn add @tknf/node-header-helpers
# or
npm install --save @tknf/node-header-helpers
Use on express
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(`<body>Hello world!</body>`);
});