Installing the DemoΒΆ

To start looking at the Knomi Web demo, we recommend having an http server capable of ensuring that wasm binaries have the correct associated MIME-type. Wasm binaries require the MIME-type application/wasm to be set.

We included a sample python script which create a http server capable of this.

import http.server
from http.server import HTTPServer, BaseHTTPRequestHandler
import socketserver

PORT = 8010
Handler = http.server.SimpleHTTPRequestHandler
Handler.extensions_map= {
  '.manifest': 'text/cache-manifest',
  '.html': 'text/html',
  '.png': 'image/png',
  '.jpg': 'image/jpg',
  '.svg': 'image/svg+xml',
  '.css': 'text/css',
  '.js': 'application/x-javascript',
  '.wasm': 'application/wasm',
  '': 'application/octet-stream', # Default
}
httpd = socketserver.TCPServer(("", PORT), Handler)
httpd.serve_forever()

Other than this requirement, installing the demo should be as simple as copying the files to your web server.