Created
August 8, 2017 11:04
-
-
Save surajnarwade/51b0d68048d5c86439ca409a26a3b0ad to your computer and use it in GitHub Desktop.
Simple static file server in go
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"net/http" | |
"os" | |
) | |
func main() { | |
dir, _ := os.Getwd() | |
http.ListenAndServe(":3000", http.FileServer(http.Dir(dir))) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment