Eric Woodward 8658a14200 Move plugins to express-twtkpr-core-plugins package
Add plugin structure
Fix stale cache after posting
Update to v0.9.0
2026-05-12 23:43:26 -04:00
2026-03-17 22:49:38 -04:00
2026-03-17 22:49:38 -04:00
2026-03-17 22:49:38 -04:00
2026-03-17 22:49:38 -04:00
2026-03-17 22:49:38 -04:00
2026-03-17 22:49:38 -04:00
2026-03-17 22:49:38 -04:00
2026-03-17 22:49:38 -04:00

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.txt file from within a browser.
  • Includes a ull-featured GET API for your twtxt.txt file backed by an in-memory cache.
  • Supports optional drag-and-drop file upload handling with automatic linking.

Installing

Add package:

yarn add express-twtkpr

Generate hash:

yarn run get:hash

Create username and password:

yarn run set:user

Using

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.

Description
ExpressJS plugin which supports twtxt.txt file handling
Readme MIT 341 KiB
Languages
TypeScript 74.2%
JavaScript 13.4%
CSS 12.4%