Azure static web apps sub directory

Mike Harper 41 Reputation points
2020-11-26T13:37:11.013+00:00

I have a vue/gridsome site deployed to azure static web apps and want to serve the site from /app instead of root. Is this possible? it builds a /app directory with all the static files but I always get 404 when navigating to /app - I've tried playing with routes.json. Thanks!

Azure Static Web Apps
Azure Static Web Apps
An Azure service that provides streamlined full-stack web app development.
966 questions
{count} votes

Accepted answer
  1. SnehaAgrawal-MSFT 21,691 Reputation points
    2020-12-08T13:33:20.287+00:00

    We apologize for the delay you encountered in hearing back from an engineer but we thank you for your patience.

    Azure Static Web Apps is a new product in preview that we just started supporting on Microsoft Q&A a little bit ago. We have taken an action item to add this tag to our internal tooling so we can reply quicker to future issues.

    Thanks for asking question! Just to confirm if you have configured the default fallback route. As you need to configure this so that the static web app’s client-side routes work properly and you don’t get a 404. For Vue, you have to add a routes.json file into your public folder.

    You may want to refer this doc: Routing in Azure Static Web Apps

    Also you may refer to this blog on Getting Started with Azure Static Web Apps might be helpful.

    Please let us know if you have further question on this or issue persists. Looking forward to help you on this.

    Disclaimer: This response contains a reference to a third-party World Wide Web site. Microsoft is providing this information as a convenience to you.

    0 comments No comments

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.