serving static files with pm2

Viewed 419

I am serving static files with pm2 via pm2 serve static PORTNUM. It works except, one issue I have is that I have a route called http://webbite.com/search and the webpage to serve is in /search/index.html. The problem is, pm2 takes /search literally and looks for a file called search and not the index.html within the search directory.

Hence, I get this error:

Error while serving /home/ubuntu/redacted/_site/school with content-type text/plain : EISDIR: illegal operation on a directory, read

Is there a setting I can pass in to pm2 to let it know that if it's a directory, look for the index.html page in it?

0 Answers
Related