Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

jxkdazki's avatar

Deployment of LARAVEL API and Vuejs

Hi, im newbie at Web Dev, im planning to deploy Laravel API and Vuejs SPA however im using Vue CLI for my spa so they were in completely running in different local server, now that im planning to deploy it. how should i do it ?

0 likes
4 replies
Helmchen's avatar

If you want to keep them separate, you can simply use a subdomain for your API and keep the SPA on the main domain.

if you have a folder your-app.com containing your Laravel sources

api.your-app.com -> your-app.com/public

your-app.com -> your-app.com/frontend

where frontend is just another subfolder which contains your SPA assets and index.html

You can also use 2 completely different folders if you don't want to mix them, that was only an example.

jxkdazki's avatar

@Helmchen, can i ask where i can deploy my laravel api for free? I cannot find any hosting site that can deploy laravel for free.

Helmchen's avatar

@jxkdazki i am not aware of any free hosting service that is recommendable. i would probably go for some small cloud server somewhere .. they start at 3$ a month and depending on your needs, can support multiple sites at once.

1 Core and 1GB RAM is enough to get started.

Please or to participate in this conversation.