DEV Community

Discussion on: How to Serve Nodejs Application from sub directory with PHP Application on root?

Collapse
 
lito profile image
Lito

Node can run on any directory, but you must execute it as service (like php-fpm). You can manage your node services with pm2 or run node directly from source folder.

Collapse
 
gurupal profile image
Gurupal Singh

I am running node app via pm2. But getting 404 for css/images/js. Already given the public path but it is not working

Collapse
 
lito profile image
Lito • Edited

Are the assets being redirected to your node app? Is pm2 logs showing the assets requests?