Unverified Commit b70fb74f authored by Hong Minhee's avatar Hong Minhee
Browse files

Update docs

parent 9d9c9817
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -21,6 +21,7 @@ framework.
 -  [Inbox listeners](./manual/inbox.md)
 -  [Collections](./manual/collections.md)
 -  [NodeInfo](./manual/nodeinfo.md)
 -  [Testing](./manual/test.md)

However, this manual is not a complete guide to the Fedify framework.
In particular, you probably want to look up the [API reference] times to times,
+2 −0
Original line number Diff line number Diff line
@@ -158,6 +158,8 @@ const json = await object.toJsonLd(ctx);
Getting an authenticated `DocumentLoader`
-----------------------------------------

*This API is available since Fedify 0.4.0.*

Sometimes you need to load a remote document which requires authentication,
such as an actor's following collection that is configured as private.
In such cases, you can use the `Context.getDocumentLoader()` method to get

docs/manual/test.md

0 → 100644
+51 −0
Original line number Diff line number Diff line
---
parent: Manual
nav_order: 8
metas:
  description: >-
    Testing a federated server app is a bit tricky because it requires a
    federated environment.  This document explains how to easily test your
    federated server app with the help of several tools.
---

Testing
=======

Testing a federated server app is a bit tricky because it requires a federated
environment.  This document explains how to easily test your federated server
app with the help of several tools.


Exposing a local server to the public
-------------------------------------

To test your federated server app, you need to expose your local server to the
public internet with a domain name and TLS certificate.  There are several tools
that help you do that:

 -  [ngrok](https://ngrok.com/)
 -  [serveo](https://serveo.net/)
 -  [localhost.run](https://localhost.run/)

> [!NOTE]
> These tools are not for production use; they are for testing only.
> In production, you should expose your server with a proper domain and TLS
> certificate.

<!-- cSpell: ignore serveo -->


Inspecting ActivityPub messages
-------------------------------

[ActivityPub.Academy] is a special Mastodon instance that is designed for
debugging and testing ActivityPub peers.  You can create an account on it and
use it for testing your federated server app.  Its best feature is that it
provides a web interface for debugging ActivityPub messages.  Any sent and
received activities are displayed on the web interface in real-time.

> [!NOTE]
> Any accounts on ActivityPub.Academy are volatile; they are deleted after a
> certain period of inactivity.

[ActivityPub.Academy]: https://activitypub.academy/