New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Replace server.py with something a little more .NET #88
Comments
C# devs love F# ;) |
Great work @praeclarum! The server.py example is for python 2, so if anyone out there is trying with python 3: import http.server
import socketserver
PORT = 8000
class Handler(http.server.SimpleHTTPRequestHandler):
pass
Handler.extensions_map['.wasm'] = 'application/wasm'
httpd = socketserver.TCPServer(("", PORT), Handler)
print("serving at port", PORT)
httpd.serve_forever() |
Maybe this can be used instead https://github.com/natemcmaster/dotnet-serve |
@hoetz I saw that this morning! Yeah I will definitely check it out. |
I've tried it out and dotnet-serve works well! Need to update the guides... |
Updated the wiki |
You still need to update 7. in the wiki :) |
Thanks! |
Hi guys, Just to give ever another option if don't want to update .NET Core to its preview or have already installed Python 3.x like me :-) Simply use "xsp4" bin from Mono's distribution to run a local server from CLI. In macOS, you can already type this if have Xamarin installed. In Windows, simply point to mono-project.org and download it. Thanks! -Marcos |
This static page server is used to make sure wasm files get the right content type and to enable XmlHttpRequests for the assemblies.
Python servers are fine for Linux and Mac, but don't work by default on Windows.
Let's replace it with a nice .NET script instead.
An F# script would be perfect, but I worry if that is too intimidating for C# devs.
Alternatively, maybe a
dotnet
tool or run configuration or some other magic could be used.The text was updated successfully, but these errors were encountered: