tangled
alpha
login
or
join now
kacaii.dev
/
sigo
0
fork
atom
๐ฉโ๐ Firefighters API written in Gleam!
lustre
gleam
0
fork
atom
overview
issues
pulls
pipelines
:hammer: add "private" to recipes
kacaii.dev
1 week ago
34a42a25
6f09b6f7
verified
This commit was signed with the committer's
known signature
.
kacaii.dev
SSH Key Fingerprint:
SHA256:n9v7QGNWHCUv1x/483hCtPUvTsVabU5PzC5CSJMUNtI=
+33
-25
4 changed files
expand all
collapse all
unified
split
client
justfile
justfile
server
justfile
shared
justfile
+7
-7
client/justfile
···
1
1
-
input_css := "input.css"
1
1
+
input_css := "input.css"
2
2
output_css := ".." / "server" / "priv" / "static" / "output.css"
3
3
4
4
@_default:
5
5
-
just --list
5
5
+
just --list
6
6
7
7
# Build CSS and JS runtime
8
8
build:
9
9
-
npx @tailwindcss/cli -i {{input_css}} -o {{output_css}}
10
10
-
gleam run -m lustre/dev build
9
9
+
npx @tailwindcss/cli -i {{ input_css }} -o {{ output_css }}
10
10
+
gleam run -m lustre/dev build
11
11
12
12
# Watch for file changes
13
13
tailwind-watch:
14
14
-
npx @tailwindcss/cli -i {{input_css}} -o {{output_css}} --watch
14
14
+
npx @tailwindcss/cli -i {{ input_css }} -o {{ output_css }} --watch
15
15
16
16
# Update project dependencies
17
17
deps-update:
18
18
-
gleam deps update
18
18
+
gleam deps update
19
19
20
20
# Lint project
21
21
lint:
22
22
-
gleam check
22
22
+
gleam check
+16
-8
justfile
···
6
6
7
7
pg_image := "docker.io/postgres:18-alpine"
8
8
pg_env := "-e POSTGRES_USER -e POSTGRES_PASSWORD -e POSTGRES_DB"
9
9
+
pg_port := "5432"
9
10
pg_volume := "-v ./sql/create:/docker-entrypoint-initdb.d"
10
11
11
12
pg_health_cmd := "--health-cmd 'pg_isready -U ${POSTGRES_USER} -d ${POSTGRES_DB}'"
···
18
19
19
20
# Build Lustre runtime and start HTTP server
20
21
[group("dev")]
21
21
-
dev:
22
22
+
dev: start
22
23
just client::build
23
24
just server::run
24
25
···
43
44
44
45
# Start the pod
45
46
[group("podman")]
46
46
-
start: _init-database
47
47
-
podman pod start {{pod_name}}
47
47
+
start: init-database
48
48
+
podman pod start {{ pod_name }}
48
49
49
50
# Stop pod
50
51
[group("podman")]
51
52
stop:
52
52
-
podman pod stop {{pod_name}}
53
53
+
podman pod stop {{ pod_name }}
53
54
54
54
-
@_init-database: _create-pod
55
55
-
podman run --rm -d --name postgres-database --pod {{pod_name}} --replace {{ pg_env }} \
55
55
+
# Clean pod resources
56
56
+
[group("podman")]
57
57
+
clean:
58
58
+
podman pod rm -f {{ pod_name }}
59
59
+
60
60
+
[private]
61
61
+
@init-database: create-pod
62
62
+
podman run --rm -d --name postgres-database --pod {{ pod_name }} --replace {{ pg_env }} \
56
63
{{ pg_health_cmd }} {{ pg_health_conf }} {{ pg_health_start_period }} \
57
64
{{ pg_volume }} {{ pg_image }}
58
65
59
59
-
@_create-pod:
60
60
-
podman pod create --name {{pod_name}} --replace -p 5432:5432
66
66
+
[private]
67
67
+
@create-pod:
68
68
+
podman pod create --name {{ pod_name }} --replace -p {{ pg_port }}:5432
+7
-7
server/justfile
···
1
1
@_default:
2
2
-
just --list
2
2
+
just --list
3
3
4
4
# ๏ณ Start HTTP server
5
5
run:
6
6
-
gleam run
6
6
+
gleam run
7
7
8
8
# ๓ฐจ Run unit tests
9
9
test:
10
10
-
gleam test
10
10
+
gleam test
11
11
12
12
# ๏ Lint project
13
13
lint:
14
14
-
gleam check
14
14
+
gleam check
15
15
16
16
-
# ๏ Generate SQL queries
16
16
+
# ๏ Generate SQL queries
17
17
sql:
18
18
-
gleam run -m squirrel
18
18
+
gleam run -m squirrel
19
19
20
20
# ๏ข Update project dependencies
21
21
deps-update:
22
22
-
gleam deps update
22
22
+
gleam deps update
+3
-3
shared/justfile
···
1
1
@_default:
2
2
-
just --list
2
2
+
just --list
3
3
4
4
# Update project dependencies
5
5
deps-update:
6
6
-
gleam deps update
6
6
+
gleam deps update
7
7
8
8
# Lint project
9
9
lint:
10
10
-
gleam check
10
10
+
gleam check