Skip to content

bug: net/http server not working on linux #4346

@ldemailly

Description

@ldemailly
package main

import (
    "net/http"
    "log"
)

func helloHandler(w http.ResponseWriter, r *http.Request) {
    w.Write([]byte("Hello, TinyGo!"))
}

func main() {
    mux := http.NewServeMux()
    mux.HandleFunc("/", helloHandler)
    log.Fatal(http.ListenAndServe(":8080", mux))
}
tinygo run .
panic: runtime error at 0x0000000000233e7f: nil pointer dereference
error: failed to run compiled binary /tmp/tinygo1722875622/main: signal: aborted (core dumped)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions