As the title says, I'm trying to execute a PHP file on a localhost but it just downloads the file instead. I am using the npm package http-server. I have tried with SimpleHTTPServer from python, but it does the same thing.
I'm running MacOS Mojave. What should I do?