How to add two frontend with a single backend on app platform

Posted May 27, 2021 814 views

I was able to deploy the vue frontend and a lavarel backend on the app platform using this tutorial So, I tried adding another frontend so it can use the same backend then pointed it to route “/admin” but I was getting a blank page. What I want to achieve is that when I do www.domainname/admin, I should be able to access the new vue frontend I

I look forward for help as soon. Thanks

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Submit an Answer
1 answer

Hi @thinkshifts,

As a first troubleshooting step please browse to /admin and look for any errors in your browser’s developer tools console. It’s possible that Vue.js isn’t aware of /admin at build-time and not including it in the URLs for JS and CSS assets.

If this is the case, you might need to set the publicPath option:

module.exports = {
  publicPath: process.env.NODE_ENV === 'production'
    ? '/admin/'
    : '/'