try:
    from http.server import SimpleHTTPRequestHandler
    import http.server as BaseHTTPServer
except ImportError:
    from SimpleHTTPServer import SimpleHTTPRequestHandler
    import BaseHTTPServer


class CORSRequestHandler( SimpleHTTPRequestHandler ):
    def end_headers( self ):
        self.send_header( 'Access-Control-Allow-Origin', '*' )
        SimpleHTTPRequestHandler.end_headers(self)

if __name__ == '__main__':
    BaseHTTPServer.test( CORSRequestHandler, BaseHTTPServer.HTTPServer )
@@ -1,8 +1,34 @@
+%0Aimport os%0Aimport os.path%0A
 try:%0A   
@@ -253,36 +253,255 @@
 ler(
- SimpleHTTPRequestHandler ):
+SimpleHTTPRequestHandler):%0A    def __init__(self, *args, **kwargs):%0A        self.node_dir = os.sep+'node_modules'%0A        self.main_dir = os.sep.join(os.getcwd().split(os.sep)%5B:-2%5D)%0A        SimpleHTTPRequestHandler.__init__(self, *args, **kwargs)%0A
 %0A   
@@ -521,14 +521,12 @@
 ers(
- 
 self
- 
 ):%0A 
@@ -549,17 +549,16 @@
 _header(
- 
 'Access-
@@ -583,17 +583,16 @@
 in', '*'
- 
 )%0A      
@@ -637,16 +637,219 @@
 (self)%0A%0A
+    def translate_path(self, path):%0A        if path.startswith(self.node_dir):%0A            return self.main_dir+path%0A        else:%0A            return SimpleHTTPRequestHandler.translate_path(self, path)%0A%0A
 if __nam
@@ -891,17 +891,16 @@
 er.test(
- 
 CORSRequ
@@ -940,6 +940,6 @@
 rver
- 
 )
+%0A

Make server serve all required files