Fix Makefile

This commit is contained in:
Andrew-71 2024-10-11 11:13:55 +03:00
parent eb3c1fb32a
commit b56ce43c80
3 changed files with 11 additions and 5 deletions

View file

@ -2,7 +2,7 @@ build:
go build
run:
go build & ./hibiscus-txt
go build && ./hibiscus-txt
dev:
go build & ./hibiscus-txt --config config/dev-config.txt
go build && ./hibiscus-txt --config config/dev-config.txt

View file

@ -3,13 +3,16 @@ List of things to add to this project
## Urgent (1.1.5-2.0.0)
* `style.css` in config instead of theme (provide themes as examples in repo)
* man page, maybe try packaging for fun
* Auth improvement so it DOESN'T ASK ME FOR PASSWORD EVERY DAY UGH XD
## Nice to have
* Forward/backward buttons for days
* Changelog included
* Refactor code
* API field for version
* Notifications late in the day
* man page, maybe try packaging for fun
* store passwords as hash
## Brainstorming
Don't expect any of this, these are ideas floating inside my head

View file

@ -3,7 +3,6 @@ package main
import (
"embed"
"errors"
"github.com/go-chi/chi/v5"
"html/template"
"log/slog"
"net/http"
@ -11,6 +10,8 @@ import (
"os"
"strings"
"time"
"github.com/go-chi/chi/v5"
)
type EntryList struct {
@ -56,6 +57,7 @@ var viewTemplate = template.Must(template.New("").Funcs(templateFuncs).ParseFS(P
var listTemplate = template.Must(template.New("").Funcs(templateFuncs).ParseFS(Pages, "pages/base.html", "pages/list.html"))
var template404 = template.Must(template.New("404").Funcs(templateFuncs).ParseFS(Pages, "pages/error/404.html"))
// NotFound returns a user-friendly 404 error page.
func NotFound(w http.ResponseWriter, r *http.Request) {
w.WriteHeader(404)
@ -69,6 +71,7 @@ func NotFound(w http.ResponseWriter, r *http.Request) {
}
var template500 = template.Must(template.New("500").Funcs(templateFuncs).ParseFS(Pages, "pages/error/500.html"))
// InternalError returns a user-friendly 500 error page.
func InternalError(w http.ResponseWriter, r *http.Request) {
w.WriteHeader(500)