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

Darshan_'s avatar

How to deploy Laravel with Front End React Integration?

Hello All,

I am using Laravel for creating APIs and React for creating Front End.

Now that I want to deploy it, I am not sure how do I compile the React Code into the deployment folder.

I tried 'npm run production' but I am not sure how do I upload it in Cpanel.

Please help me with the same.

0 likes
9 replies
devingray_'s avatar

There are many ways to do this. You should be more specific.

What hosting provider?

Is the react code in a different repo?

Darshan_'s avatar

Its in the same repo.. I am using Godaddy LINUX BASED vps .

trin's avatar

frontend is static files only, u just upload it

Darshan_'s avatar

Its not working.. It is not linking the APP JS file

trin's avatar

yes, i see it ) and what you want? who generate app.js? laravel?

trin's avatar

and whats probem to depoy app.js?

Please or to participate in this conversation.