Okay, so after an evening hacking session with a 4 hour blackhole of focus, I've managed to get @adonisframeworkAdonisJS Framework working together with @fedifyFedify: an ActivityPub server framework β€” now, this code is super rough, and definitely not reusable, but may I might make it into a package later.

For now, this is just an experimental demo:

github.com/ThisIsMissEm/adonis

A couple of things to note:

- Testing this between a local mastodon instance and a local Adonis.js server was a royal PITA, due to SSL requirements on Mastodon's side, and not being able to supply an extra certificate to trust (I was using localcan to proxy everything, but it uses a self-signed certificate and mastodon is very unhappy about that)

- Converting between the Request/Response objects that Fedify wants and what Adonis.js has was a little troublesome β€” it's mostly based on the express code, but modified for Adonis.js β€” I did have a bug where the body was incomplete for some reason.

- Changing instance URLs is a PITA because everything gets weirdly cached. Here be dragons.

- I did hit into an issue with firstKnock throwing an error, but I can't manage to reproduce it now. I think it may have been SSL related.

1

If you have a fediverse account, you can quote this note from your own instance. Search https://hachyderm.io/users/thisismissem/statuses/114769183130891957 on your instance and quote it. (Note that quoting is not supported in Mastodon.)