0

I would like to send a PHP file with NodeJS instead of HTML file, This is my script:

app.use(express.static(path.join(__dirname, 'public')));
app.get('/', function(req, res) {
   res.sendFile(path.join(__dirname + '/serv.html'));
})   

It doesn't works when I replace 'serv.html' with 'serv.php'...

Thank you very much

0 Answers0