express-twtkpr
v0.9.0
Published
An express library for hosting and maintaining a twtxt.txt file.
Readme
Twtkpr
An ExpressJS router for serving, sharing, and updating a
twtxt.txt file.
[!WARNING]
STILL IN ALPHA: Although this is a fully-functional plugin which is actively deployed to at least one site (my own), it currently lacks documentation, examples, tests, installation flexibility, or polish (and still has a couple of bugs that need to be fixed). USE AT YOUR OWN RISK
Features
- Uses JWT (with refresh) for security.
- Allows for adding new twts and directly editing a
twtxt.txtfile from within a browser. - Includes a ull-featured GET API for your
twtxt.txtfile backed by an in-memory cache. - Supports optional drag-and-drop file upload handling with automatic linking.
Installing
Add package:
yarn add express-twtkprGenerate hash:
yarn run get:hashCreate username and password:
yarn run set:userUsing
Use it in an express application:
import express, { Request, Response } from "express";
import twtkpr from "express-twtkpr";
// import other middleware
const app = express();
// add other middleware
app.use(
"/",
twtkpr(
{
// config options
},
),
);
// add error handler
export default app;
Starting with v0.9.0, extra features (like files uploading) were moved to the express-twtkpr-core-plugins package.
More to come!
License
Copyright (c) 2026 Eric Woodward, released under the MIT License.
