html - script and CSS file not load in node JS? -


i unable load jquery , css file in node js

public javascripts stylesheets 

i have html file read in server.js 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 load script , css file correctly.


Comments

Popular posts from this blog

php - Vagrant up error - Uncaught Reflection Exception: Class DOMDocument does not exist -

vue.js - Create hooks for automated testing -

Add new key value to json node in java -