pm2
pm2 copied to clipboard
pm2 serve : index.html as default file on subdirectories
When accessing to a subdirectorie with no file specified, we don't get index.html file which is in the directory
/
expected
/index.html (currently OK)
/subdir/ => error is dir
expected
/subdir/index.html (currently not OK)
Supporting information
PM2 version: `pm2 -v` : 2.4.6
Node version: `node -v` : node-v6.10.2-linux-x64/
Should be easy as appending /index.html
if the path is a directory (here), if you can make a PR :)
@ssavajols PR welcome, it's quite an easy fix
I can see it's easy, but for my use I've replaced pm2 serve by npm module serve. So I don't need it now and I don't have time for now to do it. If I can in the next few weeks, I'll do it.
Hi @Unitech,
I'd like to see the changes from @JackLLLLL in one of the next releases because #4220 doesn't fix this. See https://github.com/Unitech/pm2/pull/4196#issuecomment-704814484 for more information.
Thanks & bye Ralf
Hi, I have the same problem trying to serve static output from a Nuxt 3 project. Any news?
Any update on this? Issue for me too. I'm trying to serve my docs created using Docusaurus
same problem