README: move available policies to the top

This commit is contained in:
Alex Gleason 2023-03-30 14:42:13 -05:00
parent 608bd6069c
commit a327ec132f
No known key found for this signature in database
GPG Key ID: 7211D1F99744FBB7

View File

@ -63,6 +63,12 @@ Finally, edit `strfry.conf` and enable the policy:
That's it! 🎉 Now you should check strfry logs to ensure everything is working okay. That's it! 🎉 Now you should check strfry logs to ensure everything is working okay.
## Available policies
For complete documentation of policies, see:
- https://doc.deno.land/https://gitlab.com/soapbox-pub/strfry-policies/-/raw/develop/mod.ts
## Writing your own policies ## Writing your own policies
You can write a policy in TypeScript and host it anywhere. Deno allows importing modules by URL, making it easy to share policies. You can write a policy in TypeScript and host it anywhere. Deno allows importing modules by URL, making it easy to share policies.
@ -173,12 +179,6 @@ Then, in the pipeline:
- You should not use `console.log` anywhere in your policies, as strfry expects stdout to be the strfry output message. - You should not use `console.log` anywhere in your policies, as strfry expects stdout to be the strfry output message.
## Available policies
For complete documentation of policies, see:
- https://doc.deno.land/https://gitlab.com/soapbox-pub/strfry-policies/-/raw/develop/mod.ts
## Filtering jsonl events with your policy ## Filtering jsonl events with your policy
It is not currently possible to retroactively filter events on your strfry relay. You can however export the events with `strfry export`, filter them locally, and then import them into a fresh database. You can also use this command to filter Nostr events from any source, not just strfry. It is not currently possible to retroactively filter events on your strfry relay. You can however export the events with `strfry export`, filter them locally, and then import them into a fresh database. You can also use this command to filter Nostr events from any source, not just strfry.