lift things out of backend/
This commit is contained in:
parent
e8d775d96d
commit
9e03bdb2de
4
Makefile
4
Makefile
|
|
@ -1,10 +1,10 @@
|
||||||
.PHONY: build
|
.PHONY: build
|
||||||
|
|
||||||
build:
|
build:
|
||||||
go build backend/bin/shelves.go
|
go build bin/shelves.go
|
||||||
|
|
||||||
run:
|
run:
|
||||||
go run backend/bin/shelves.go
|
go run bin/shelves.go
|
||||||
|
|
||||||
watch:
|
watch:
|
||||||
fd | entr -cr make run
|
fd | entr -cr make run
|
||||||
|
|
|
||||||
|
|
@ -7,9 +7,9 @@ import (
|
||||||
|
|
||||||
_ "github.com/mattn/go-sqlite3"
|
_ "github.com/mattn/go-sqlite3"
|
||||||
|
|
||||||
"shelves/backend/db"
|
"shelves/db"
|
||||||
"shelves/backend/httpx"
|
"shelves/httpx"
|
||||||
"shelves/backend/routes"
|
"shelves/routes"
|
||||||
)
|
)
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
|
|
@ -4,8 +4,8 @@ import (
|
||||||
"log"
|
"log"
|
||||||
"net/http"
|
"net/http"
|
||||||
"net/url"
|
"net/url"
|
||||||
"shelves/backend/errorsx"
|
"shelves/errorsx"
|
||||||
"shelves/backend/urls"
|
"shelves/urls"
|
||||||
)
|
)
|
||||||
|
|
||||||
func SeeOther(w http.ResponseWriter, location string) {
|
func SeeOther(w http.ResponseWriter, location string) {
|
||||||
|
|
@ -5,7 +5,7 @@ import (
|
||||||
"database/sql"
|
"database/sql"
|
||||||
"log"
|
"log"
|
||||||
"net/http"
|
"net/http"
|
||||||
"shelves/backend/auth"
|
"shelves/auth"
|
||||||
"time"
|
"time"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
@ -2,8 +2,8 @@ package routes
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"net/http"
|
"net/http"
|
||||||
"shelves/backend/httpx"
|
"shelves/httpx"
|
||||||
"shelves/backend/templates"
|
"shelves/templates"
|
||||||
)
|
)
|
||||||
|
|
||||||
type homeTemplate struct {
|
type homeTemplate struct {
|
||||||
|
|
@ -5,11 +5,11 @@ import (
|
||||||
"html/template"
|
"html/template"
|
||||||
"net/http"
|
"net/http"
|
||||||
"net/url"
|
"net/url"
|
||||||
"shelves/backend/auth"
|
"shelves/auth"
|
||||||
"shelves/backend/errorsx"
|
"shelves/errorsx"
|
||||||
"shelves/backend/forms"
|
"shelves/forms"
|
||||||
"shelves/backend/httpx"
|
"shelves/httpx"
|
||||||
"shelves/backend/templates"
|
"shelves/templates"
|
||||||
)
|
)
|
||||||
|
|
||||||
type loginForm struct {
|
type loginForm struct {
|
||||||
|
|
@ -3,7 +3,7 @@ package routes
|
||||||
import (
|
import (
|
||||||
"html/template"
|
"html/template"
|
||||||
"net/http"
|
"net/http"
|
||||||
"shelves/backend/httpx"
|
"shelves/httpx"
|
||||||
"strings"
|
"strings"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
|
|
@ -6,11 +6,11 @@ import (
|
||||||
"html/template"
|
"html/template"
|
||||||
"net/http"
|
"net/http"
|
||||||
"net/url"
|
"net/url"
|
||||||
"shelves/backend/auth"
|
"shelves/auth"
|
||||||
"shelves/backend/errorsx"
|
"shelves/errorsx"
|
||||||
"shelves/backend/forms"
|
"shelves/forms"
|
||||||
"shelves/backend/httpx"
|
"shelves/httpx"
|
||||||
"shelves/backend/templates"
|
"shelves/templates"
|
||||||
)
|
)
|
||||||
|
|
||||||
func settingsRenderView(f settingsForm, e settingsFormErrors) template.HTML {
|
func settingsRenderView(f settingsForm, e settingsFormErrors) template.HTML {
|
||||||
|
|
@ -2,7 +2,7 @@ package templates
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"html/template"
|
"html/template"
|
||||||
"shelves/backend/auth"
|
"shelves/auth"
|
||||||
)
|
)
|
||||||
|
|
||||||
type PageBase struct {
|
type PageBase struct {
|
||||||
Loading…
Reference in a new issue