WIP: migrate to flake-based config
5 files changed,  +18, -3
M Makefile
+8, -3
 1@@ -3,12 +3,17 @@ SHELL := /bin/bash
 2 
 3 GRAPHHOPPER := $(shell command -v graphhopper)
 4 
 5-build:
 6+build: build-deps
 7+	cd server && $(MAKE) build
 8+.PHONY: build
 9+
10+build-deps:
11 	cd client && pnpm i --frozen-lockfile
12 	cd client && pnpm run build
13 	esbuild ./client/src/sw.js --bundle --outfile=./server/pages/static/js/sw.js --minify --format=iife --platform=browser --target=es2015
14-	cd server && $(MAKE) build
15-.PHONY: build
16+	cd server && go tool templ generate
17+	cd server && tailwindcss -m --cwd pages/ -i index.css -o static/css/style.css
18+.PHONY: build-deps
19 
20 preview:
21 	cd server && $(MAKE) preview
M client/vite.config.js
+4, -0
 1@@ -56,6 +56,10 @@ export default defineConfig({
 2         target: "http://127.0.0.1:8080",
 3         changeOrigin: true,
 4       },
 5+      "/u": {
 6+        target: "http://127.0.0.1:8080",
 7+        changeOrigin: true,
 8+      },
 9     },
10   },
11   build: {
M flake.nix
+1, -0
1@@ -68,6 +68,7 @@
2               pkgs.templ
3               pkgs.gnumake
4               pkgs.brotli
5+              pkgs.esbuild
6               pkgs.golangci-lint
7               bug.packages.${system}.default
8               concurrently.packages.${system}.default
M server/app.go
+2, -0
1@@ -112,6 +112,8 @@ func NewApp(cfg *Config) (*App, error) {
2 		r.Handle("GET /404", templ.Handler(pages.NotFound()))
3 		r.Handle("GET /500", templ.Handler(pages.ServerError()))
4 		r.Handle("GET /403", templ.Handler(pages.Forbidden()))
5+
6+		r.Handle("GET /", http.RedirectHandler("/about", http.StatusSeeOther))
7 	})
8 
9 	// Static assets from the embedded filesystem.
M server/config.toml
+3, -0
 1@@ -10,6 +10,9 @@ public-url = 'http://127.0.0.1:8080'
 2 # base directory for server state (empty = current working directory, relative paths resolved against working directory)
 3 data-dir = ''
 4 
 5+[protomaps]
 6+api-key = '44608337582f97a2'
 7+
 8 [ysweet]
 9 # URL of the upstream jamsocket/ysweet server to persist documents
10 url = 'http://127.0.0.1:9000'