Hey there,
I’m deploying a web app based on Strapi for the backend + VueJS for the frontend so I’d like to serve the SPA app from Strapi server, my idea is to build the Vue app and move built assets into Strapi public/ folder, but to make this working I need to change Strapi router prefix, so the REST API would be served at /api, then I’ll create some rule to rewrite any URL but static files and /api to /index.html
Now I searched a lot but I couldn’t find a clear answer or docs on how to set a global prefix for the API (I don’t care that much of the admin portal for now and it could stay at /admin).
I tried to set server.url, the config is applied as the CLI prints:
Welcome back!
To manage your project �, go to the administration panel at:
http://localhost:1337/api/admin
To access the server
, go to:
http://localhost:1337/api
but I can’t access the API and also the admin is broken as it tries to load static assets from /admin. I also tried to set middleware.router.prefix but it seems ignored
Do you have any idea? how do you typically deploy strapi + spa?