I integrate a third-party template that has a slide show written using Mootools. Js node configured with expression and ejs
The data for the slide show comes from several XML files. For example, data.xml. I put data.xml in a shared folder and added the following code to server.js (main file)
app.use(express.static(__dirname + '/public'));
app.post('/data.xml', function(req, res){
res.contentType('application/xml');
res.sendFile('/data.xml');
});
Unfortunately this does not work. I can see the file if I type the URL
http: // localhost: 8080 / data.xml
But the answer I see in firebug is Msgstr "Cannot POST / data.xml"
I assume that Mootools is trying to access the file using some POST method. Any suggestions on this issue?
source
share