Changing from js to golang

This commit is contained in:
2024-01-29 14:55:20 +01:00
parent 30d8ca73da
commit f4a2251178
40 changed files with 1174 additions and 438 deletions

View File

@@ -2,11 +2,12 @@ package server
import (
"fmt"
"github.com/gorilla/mux"
"html/template"
"io/ioutil"
"path/filepath"
"strings"
"github.com/gorilla/mux"
)
var tPath = "./web/tpl/"
@@ -42,5 +43,7 @@ func CreateRoutes() *mux.Router {
r.HandleFunc("/dan/{date}", dailyArticlesHandler)
r.HandleFunc("/{id:[0-9]+}/{slug}", articleHandler)
r.HandleFunc("/", rootHandler)
r.HandleFunc("/weather", WeatherHandler)
r.HandleFunc("/{category}", categoryHandler)
return r
}