I ran the d2-app-scripts build and then installed onto the server. Any help would be appreciated.
The app runs when I connect to the server from my localhost when running d2-app-scripts start
Regards
Pooben
What type of router are you using? is it the BrowserRouter? If so, you can try specifying the basename when building the app which in your case would be ${baseUrl}/apps/${appname} where the base URL can be obtained from the useConfig hook and the app name is the name of your app specified as name in the d2.config.js or package.json.
Alternatively, you can use the HashRouter without specifying the basename.
Thanks for your speedy response. I am using BrowserRouter.
Please could you provide mw with an example of how this would work?
This is the build script I run ‘yarn d2-app-scripts build’. Where do I use the useConfig hook?