Skip to content

Instantly share code, notes, and snippets.

@parzibyte
Created August 13, 2021 01:35
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save parzibyte/6cb49ccaf879bff675fd53cb6297cd78 to your computer and use it in GitHub Desktop.
package main
import "log"
import "net/http"
func main() {
directorio := "./static"
http.Handle("/", http.FileServer(http.Dir(directorio)))
direccion := ":8000"
log.Println("Servidor listo escuchando en " + direccion)
log.Fatal(http.ListenAndServe(direccion, nil))
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment