1

I unable to load jquery and css file in node js

public
javascripts
stylesheets

i have html file i read that in server.js as follow

http.createServer(function (req, res) {
res.writeHead(200, { 'Content-Type': 'text/html' });
fs.readFile('Views/index.html', 'utf8', function (error, data) {
    if (error) {
        res.writeHead(404);
        res.write('file not found');
    }
    else {
        res.write(data);
    }
    res.end()
});
}).listen(port);

how to load script and css file correctly.

jeya jj
  • 23
  • 2

0 Answers0