Skip to content
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

add normal HTTP server listener for debugging purposes #114

Merged
merged 1 commit into from
May 2, 2024

Conversation

syumai
Copy link
Owner

@syumai syumai commented May 2, 2024

What

  • This PR adds normal HTTP server listener for debugging purposes.
  • With this feature, the example below works using only the go run command without GOOS and GOARCH.
package main

import (
	"fmt"
	"net/http"

	"github.com/syumai/workers"
)

func main() {
	handler := http.HandlerFunc(func(w http.ResponseWriter, req *http.Request) {
		fmt.Fprint(w, "Hello, world!")
	})
	workers.Serve(handler)
}

Motivation

  • To make development easier for developers who are not familiar with JS/Wasm.

@syumai syumai self-assigned this May 2, 2024
@syumai syumai merged commit 9ca5cf3 into main May 2, 2024
2 checks passed
@syumai syumai deleted the add-non-js-handler branch May 2, 2024 17:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant