Support for the basics of federation #1
1 changed files with 8 additions and 9 deletions
17
src/main.ts
17
src/main.ts
|
@ -1,12 +1,12 @@
|
||||||
import {createFederation} from "@fedify/fedify"
|
import {createFederation} from "@fedify/fedify"
|
||||||
import {RedisKvStore} from "https://jsr.io/@fedify/redis/0.3.0/src/kv.ts"
|
import {RedisKvStore} from "https://jsr.io/@fedify/redis/0.3.0/src/kv.ts"
|
||||||
import {Redis} from "ioredis";
|
import {Redis} from "ioredis"
|
||||||
|
|
||||||
|
|
||||||
const federation = createFederation<void>({
|
const federation = createFederation<void>({
|
||||||
kv: new RedisKvStore(
|
kv: new RedisKvStore(
|
||||||
new Redis({}),
|
new Redis({}),
|
||||||
{}
|
{},
|
||||||
),
|
),
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -15,16 +15,15 @@ const handler: Deno.ServeHandler = function handler(request) {
|
||||||
request,
|
request,
|
||||||
{
|
{
|
||||||
contextData: undefined,
|
contextData: undefined,
|
||||||
}
|
},
|
||||||
)
|
);
|
||||||
|
|
||||||
return response
|
return response
|
||||||
}
|
};
|
||||||
|
|
||||||
|
|
||||||
Deno.serve(
|
Deno.serve(
|
||||||
{
|
{
|
||||||
port: 8080
|
port: 8080,
|
||||||
},
|
},
|
||||||
handler
|
handler,
|
||||||
)
|
);
|
||||||
|
|
Loading…
Reference in a new issue