vendredi 10 juin 2016

Reading css file from nodejs


How do I get my css file to be read by node js. I have the html file read by the code below.

function displayForm(res) {
fs.readFile('index.html', function (err, data) {
    res.writeHead(200, {
        'Content-Type': 'text/html',
    });
    res.write(data);
    res.end();
});
 }

Aucun commentaire:

Enregistrer un commentaire