The program must be hosted by the http server.

Using Node http-server package:

      In the program directory, run command:
       > Skip first if the requirement is already satisfied.
      npm install http-server
      npm run start

Using Python http-server module:

      In the program directory, run command:
      python3 -m http.server --bind localhost --directory ./ 8000

Open Browser and Visit localhost:8000

Note:

     The http server could serve the files as plain text,in that case try using other http servers.