I have a simple web app that I am using to control a device, its just html+css+js.

I want to host that app on a raspberry pi and use it as a local server, so that I can open that app from tablets, pcs, phones etc, whatever I want.

I tried setting up a nodejs server to host the app, this is the code that I used, found it somewhere here on the forum:

```
var http = require('http');
var fileSystem = require('fs');

var server = http.createServer(function(req, resp){
    fileSystem.readFile('./index.html', function(error, fileContent){
        if(error){
            resp.writeHead(500, {'Content-Type': 'text/plain'});
            resp.end('Error');
        }
        else{
            resp.writeHead(200, {'Content-Type': 'text/html'});
            resp.write(fileContent);
            resp.end();
        }
    });
});

server.listen(8081);    
console.log('listening');

```

And it is kinda working. If I open the app from <http://127.0.0.1:8081> on the computer on which it is hosted (mind you atm I am not on the raspberry, still testing on my personal pc) it is working as expected, if I directly open the index.html it is also working just fine.
But if I go and try to open it from my phone, or from my laptop from <http://192.168.0.2:8081> it is not working. By not working I mean the following:

* On the laptop it just renders the bare html and nothing else, there are several errors in the console about 'unexpected token <' I have one for each of my javascript files, and it is pointing at the first row of my HTML file the row
* On my phone, same issue, I connected it for USB debugging to chrome to see the Console, I have the same errors screenshot: <http://prntscr.com/s65x0t>

Here is my HTML code, I did some research, many people were pointing out that some of the JS files that I have linked in my HTML may have incorrect directory or file name, but at least I dont see an issue there:

```
<!DOCTYPE html>
<html lang="en">

<head>
  <title>Title</title>
  <script type="text/javascript" src="./js/jquery-3.5.0.js"></script>
  <script type="text/javascript" src="./assets/scripts/main.js"></script>
  <script type="text/javascript" src="./js/easy-numpad.js"></script>
  <script type="text/javascript" src="./js/jquery-modal.js"></script>
  <script type="text/javascript" src="./js/Model.js"></script>
  <script type="text/javascript" src="./js/UI.js"></script>
  <script type="text/javascript" src="./js/config.js"></script>
  <link href="./css/main.css" rel="stylesheet" type="text/css" >
  <link href="./css/easy-numpad.css" rel="stylesheet" type="text/css" >

```