Commit 56c20cff authored by ChanHaeng Lee's avatar ChanHaeng Lee
Browse files

Copy `next15-app-router` to `next-integration`

parent 538730b0
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -16,6 +16,7 @@ added in the future.[^1]
     software](https://github.com/fedify-dev/hollo)
  -  [Hono integration sample](./hono-sample/)
  -  [Fedify–Express integration example](./express/)
  -  [Fedify–Next.js integration example using `@fedify/next`](./next-integration/)
  -  [Fedify–Next.js 14 integration example](./next14-app-router/)
  -  [Fedify–Next.js 15 integration example](./next15-app-router/)
  -  [Fedify on Cloudflare Workers example](./cloudflare-workers/)
+41 −0
Original line number Diff line number Diff line
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.

# dependencies
/node_modules
/.pnp
.pnp.*
.yarn/*
!.yarn/patches
!.yarn/plugins
!.yarn/releases
!.yarn/versions

# testing
/coverage

# next.js
/.next/
/out/

# production
/build

# misc
.DS_Store
*.pem

# debug
npm-debug.log*
yarn-debug.log*
yarn-error.log*
.pnpm-debug.log*

# env files (can opt-in for committing if needed)
.env*

# vercel
.vercel

# typescript
*.tsbuildinfo
next-env.d.ts
+35 −0
Original line number Diff line number Diff line
# Fedify–Next.js integration example

## Running the Example

1.  Clone the repository:

    ```sh
    git clone https://github.com/fedify-dev/fedify.git
    cd fedify/examples/next-integration
    ```

2.  Install dependencies:

    ```sh
    pnpm i
    ```

3.  Start the server:

    ```sh
    pnpm dev && pnpx @fedify/cli tunnel 3000
    ```

4.  Open your browser tunneled URL and start interacting with the app.
    You can see your handle such as
    `@demo@6c10b40c63d9e1ce7da55667ef0ef8b4.serveo.net`.

5.  Access https://activitypub.academy/ and search your handle and follow.

6.  You can see following list like:

    ```
    This account has the below 1 followers:
    https://activitypub.academy/users/beboes_bedoshs
    ```
+9 −0
Original line number Diff line number Diff line
import { fedifyRequestHandler } from "~/shared/integrate-fedify";

export {
  fedifyRequestHandler as DELETE,
  fedifyRequestHandler as GET,
  fedifyRequestHandler as PATCH,
  fedifyRequestHandler as POST,
  fedifyRequestHandler as PUT,
};
+8 −0
Original line number Diff line number Diff line
export default async function Page({
  params,
}: {
  params: Promise<{ slug: string }>;
}) {
  const slug = await params;
  return <div>Hello {slug.slug}</div>;
}
Loading