#!/usr/bin/python
# -*- coding: utf-8 -*-
import os, sys
import BaseHTTPServer, SimpleHTTPServer

PORT = 8000

def simple_web_server():
    SimpleHTTPServer.SimpleHTTPRequestHandler.extensions_map[".wasm"] = "application/wasm"
    httpd = BaseHTTPServer.HTTPServer(("localhost", PORT), SimpleHTTPServer.SimpleHTTPRequestHandler)
    httpd.serve_forever()

if __name__ == "__main__":
    appdir = os.path.abspath(os.path.dirname(sys.argv[0]))
    os.chdir(appdir)
    simple_web_server()

