Move plugins to express-twtkpr-core-plugins package

Add plugin structure
Fix stale cache after posting
Update to v0.9.0
This commit is contained in:
2026-05-12 23:43:26 -04:00
parent 298f267742
commit 8658a14200
103 changed files with 1632 additions and 1996 deletions

View File

@@ -5,7 +5,8 @@ An [ExpressJS](https://expressjs.com/) router for serving, sharing, and updating
> [!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.
> 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
@@ -17,10 +18,56 @@ An [ExpressJS](https://expressjs.com/) router for serving, sharing, and updating
## Installing
Add package:
```sh
yarn add express-twtkpr
```
Generate hash:
```sh
yarn run get:hash
```
Create username and password:
```sh
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](https://www.npmjs.com/package/express-twtkpr-core-plugins) package.
More to come!
---