-
-
Notifications
You must be signed in to change notification settings - Fork 96
Revive removed fedify init options
#638
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
+192
−11
Merged
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
69c923e
Add In-Process MessageQueue option
2chanhaeng e09fa49
Add In-Memory KV Store option
2chanhaeng 1286ef9
Add Bare-bones option in Web Framework
2chanhaeng 25f0187
Rename `bareBones` to `bare-bones` for consistency
2chanhaeng db9ed63
Compute MESSAGE_QUEUE and KV_STORE from json
2chanhaeng 67dcd7c
Filter no integration options while adding dependencies
2chanhaeng 94a347b
Use default port when can't determine the port
2chanhaeng 6ef987f
Add changelog
2chanhaeng 772b818
Add docs
2chanhaeng 731f3e3
Fix docs
2chanhaeng File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,11 +1,21 @@ | ||
| import kv from "./json/kv.json" with { type: "json" }; | ||
| import mq from "./json/mq.json" with { type: "json" }; | ||
|
|
||
| /** All supported package manager identifiers, in display order. */ | ||
| export const PACKAGE_MANAGER = ["deno", "pnpm", "bun", "yarn", "npm"] as const; | ||
| export const WEB_FRAMEWORK = [ | ||
| "bare-bones", | ||
| "hono", | ||
| "nitro", | ||
| "next", | ||
| "elysia", | ||
| "express", | ||
| ] as const; | ||
| export const MESSAGE_QUEUE = ["denokv", "redis", "postgres", "amqp"] as const; | ||
| export const KV_STORE = ["denokv", "redis", "postgres"] as const; | ||
|
|
||
| /** All supported message queue backend identifiers. */ | ||
| export const MESSAGE_QUEUE = Object.keys(mq) as readonly (keyof typeof mq)[]; | ||
|
|
||
| /** All supported key-value store backend identifiers. */ | ||
| export const KV_STORE = Object.keys(kv) as readonly (keyof typeof kv)[]; | ||
|
|
||
| export const DB_TO_CHECK = ["redis", "postgres", "amqp"] as const; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,16 @@ | ||
| import { behindProxy } from "x-forwarded-fetch"; | ||
| import federation from "./federation.ts"; | ||
| import "./logging.ts"; | ||
|
|
||
| const server = Bun.serve({ | ||
| port: 8000, | ||
| fetch: behindProxy((req) => | ||
| new URL(req.url).pathname === "/" | ||
| ? new Response("Hello, this is a Fedify server!", { | ||
| headers: { "Content-Type": "text/plain" }, | ||
| }) | ||
| : federation.fetch(req, { contextData: undefined }) | ||
| ), | ||
| }); | ||
|
|
||
| console.log("Server started at", server.url.href); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,19 @@ | ||
| import "@std/dotenv/load"; | ||
| import { behindProxy } from "@hongminhee/x-forwarded-fetch"; | ||
| import federation from "./federation.ts"; | ||
| import "./logging.ts"; | ||
|
|
||
| Deno.serve( | ||
| { | ||
| port: 8000, | ||
| onListen: ({ port, hostname }) => | ||
| console.log("Server started at http://" + hostname + ":" + port) | ||
| }, | ||
| behindProxy((req) => | ||
| new URL(req.url).pathname === "/" | ||
| ? new Response("Hello, this is a Fedify server!", { | ||
| headers: { "Content-Type": "text/plain" }, | ||
| }) | ||
| : federation.fetch(req, { contextData: undefined }) | ||
| ), | ||
| ); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,19 @@ | ||
| import { serve } from "@hono/node-server"; | ||
| import { behindProxy } from "x-forwarded-fetch"; | ||
| import federation from "./federation.ts"; | ||
| import "./logging.ts"; | ||
|
|
||
| serve( | ||
| { | ||
| port: 8000, | ||
| fetch: behindProxy((req) => | ||
| new URL(req.url).pathname === "/" | ||
| ? new Response("Hello, this is a Fedify server!", { | ||
| headers: { "Content-Type": "text/plain" }, | ||
| }) | ||
| : federation.fetch(req, { contextData: undefined }) | ||
| ), | ||
| }, | ||
| (info) => | ||
| console.log("Server started at http://" + info.address + ":" + info.port) | ||
| ); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.