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 {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>({
|
||||
kv: new RedisKvStore(
|
||||
new Redis({}),
|
||||
{}
|
||||
{},
|
||||
),
|
||||
});
|
||||
|
||||
|
@ -15,16 +15,15 @@ const handler: Deno.ServeHandler = function handler(request) {
|
|||
request,
|
||||
{
|
||||
contextData: undefined,
|
||||
}
|
||||
)
|
||||
},
|
||||
);
|
||||
|
||||
return response
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
Deno.serve(
|
||||
{
|
||||
port: 8080
|
||||
port: 8080,
|
||||
},
|
||||
handler
|
||||
)
|
||||
handler,
|
||||
);
|
||||
|
|
Loading…
Reference in a new issue