How to connect the example docs and web folder in Turbo monorepo? i.e. https://localhost:3000/docs https://localhost:3000/web

81 views Asked by At

my goal is to connect the docs and web folder.

  1. I wish to access the app from https://localhost:3000/docs or https://localhost:3000/web.
  2. I wish to share state between docs and web, i.e. a counter (1, 2, 3, and so on).

What I did:

  1. https://turbo.build/repo/docs/getting-started/create-new

Search for similar discussions:

TLDR, I am new to Next.js and Turbo.

Disclaimer:

  1. I am an Angular developer.
  2. I used to be a React developer.
  3. I am new to the Monorepo concept. i. I tried Angular Workspace and it works great but I want independent package.json per application. ii. I also want SSR. Angular Universal does offer SSR but it's relatively new. Next.js on the other hand do not offer something similar to Angular Workspace. This is where Turbo or Module Federation comes in.
  4. I see that Module Federation connect between 2 application with React.lazy() https://webpack.js.org/concepts/module-federation/
  5. I believe Next.js routing is by folder. https://nextjs.org/docs/app/building-your-application/routing/defining-routes
0

There are 0 answers