Unverified Commit ff370c17 authored by Hong Minhee (洪 民憙)'s avatar Hong Minhee (洪 民憙) Committed by GitHub
Browse files

Merge pull request #130 from ellemedit/main

Add Next.JS App Router Integration Example

[ci skip]
parents 2450f631 8908d2b0
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -13,6 +13,7 @@ added in the future.[^1]
     software](https://github.com/dahlia/hollo)
  -  [Hono integration sample](./hono-sample/)
  -  [Fedify–Express integration example](./express/)
  -  [Fedify–Next.js integration example](./next-app-router/)

[^1]: Contributions are welcome!  If you have built an application with the
      Fedify framework and want to share it with others, please consider adding
+3 −0
Original line number Diff line number Diff line
{
  "extends": ["next/core-web-vitals", "next/typescript"]
}
+40 −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*

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

# vercel
.vercel

# typescript
*.tsbuildinfo
next-env.d.ts
+1 −0
Original line number Diff line number Diff line
v20.17.0
+39 −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/dahlia/fedify.git
    cd fedify/examples/next-app-router
    ~~~~

 2. Install dependencies:

    ~~~~ sh
    # optional
    nvm use
    npm i
    ~~~~

 3. Start the server:

    ~~~~ sh
    npm run dev & npx @fedify/cli tunnel 8000
    ~~~~

 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
    ~~~~
Loading