Skip to content

Instantly share code, notes, and snippets.

Created March 27, 2016 05:20
What would you like to do?
Simple Go Webserver
package main
import (
func main() {
fmt.Println("Serving files in the current directory on port 3000")
http.Handle("/", http.FileServer(http.Dir(".")))
err := http.ListenAndServe(":3000", nil)
if err != nil {
log.Fatal("ListenAndServe: ", err)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment