I import jQuery, boostrap in my head like this
<link rel="stylesheet" href="https://www.w3schools.com/w3css/4/w3.css">
<link rel="stylesheet" type="text/css" href="css/style.css">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"</script>
I'm trying to use NodeJS and Express like this, I found it on Google
var http = require('http');
var fs = require('fs');
var express = require('express');
var app = express();
http.createServer(function(req, res) {
fs.readFile('main.html', function(err, data) {
res.writeHead(200, {
'Content-Type': 'text/html',
'Content-Length': data.length
});
res.write(data);
res.end();
});
}).listen(8000);
But when my page is loaded, those libs are not loaded. I also have some images
<div class="item active">
<a href="vungtau.html">
<img src="IntroduceImage/VungTau.jpg" alt="Vũng Tàu">
<div class="carousel-caption">
<h3>Vũng Tàu</h3>
<h4>Lần đầu đi Vũng Tàu bằng xe máy</h4>
</div>
</a>
</div>
They are not loaded too. This is address: D:\Atom Project\IntroduceImage\VungTau.jpg
Anyone know why? It I load it without NodeJS like this file:///D:/Atom%20Project/main.html. They're all loaded. Please help, Im new to NodeJS.
