I want to (1) create a server from NodeJS, (2) execute an already-developed html file that shows images and utilizes the camera, and (3) show all of that on a localhost
I have tried the below code that can run the html file, but the images do not show.
var http = require('http');
var fs = require('fs');
var serverURL = 'localhost';
fs.readFile('./index.html', function(err,html){
if (err) throw err;
http.createServer(function(req,res){
res.end(html);
}).listen(490);
})
I would like to run this html file that has several images and utilizes the camera, but none of it shows up. It is only the written information and the image error icon.