Skip to content

Commit

Permalink
Create server.py
Browse files Browse the repository at this point in the history
  • Loading branch information
stemkoski committed Oct 22, 2023
1 parent c05f51c commit 8f7a8e3
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions server.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import http.server

HandlerClass = http.server.SimpleHTTPRequestHandler

# Patch in the correct extensions
HandlerClass.extensions_map['.js'] = 'application/javascript'

# Run the server (like `python -m http.server` does)
http.server.test(HandlerClass, port=8337)

0 comments on commit 8f7a8e3

Please sign in to comment.