How do I configure configuration files for multiple applications?
Briefly

The setup involves two Next.js applications: the first hosted at the root URL and the second at a specific branch path. The first application uses a straightforward configuration, while the second adds a basePath and assetPrefix to manage its routing effectively. Both applications utilize axios for API calls. The second application's config file includes rewrites to ensure that requests to the /branch path are correctly routed, allowing both applications to live on the same server without conflict. This allows for a clear separation between the two applications in terms of their functionality and endpoints.
The Next.js applications are configured to run on the same IP address, with one accessible from the root and the other at a specific branch path.
The first application is set up with a simple Next.js configuration, while the second application leverages basePath and assetPrefix for proper path handling.
Both applications utilize axios for API calls, with distinct configurations to match their respective routing and URL structures to ensure functionality.
Proper rewrites are defined in the second application's next.config.js, allowing for seamless integration of assets and routing within the /branch context.
Read at SitePoint Forums | Web Development & Design Community
[
|
]