1. Yann Malet
  2. gowebexp

Source

gowebexp / cmd / server.go

package main

import (
	"fmt"
	"gowebexp/web"
	"net/http"
)

func main() {
	web.App.SetRoute()
	// Start serving
	fmt.Println("Starting server on : http://127.0.0.1:8080")
	http.Handle("/", web.App)

	// Serving static file
	http.Handle("/static/", http.StripPrefix("/static/", http.FileServer(http.Dir(web.App.Path+"/web/static/"))))

	http.ListenAndServe(":8080", nil)
}