-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
128 lines (115 loc) · 4.21 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
<!DOCTYPE html>
<html lang="en">
<head>
<title>🦆.lol</title>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<link rel="stylesheet" href="style.css" />
</head>
<body>
<header>
<h1>🦆.lol</h1>
<h5>
<a href="https://programming.dev/u/duck_lol" target="_blank"
>Fediverse (Lemmy)</a
>
|
<a href="https://github.com/ducklol2" target="_blank">GitHub</a>
</h5>
</header>
<main>
<article id="server-pushed-notifications">
<h5>
Feb 10, 2025 | <a href="#server-pushed-notifications">🔗</a> |
<a href="https://programming.dev/post/25249375" target="_blank"
>Discuss on Lemmy</a
>
</h5>
<h2>Server pushed notifications to a PWA (works on iOS!)</h2>
<p>
I love the idea of PWAs (progressive web apps,
<a
href="https://developer.mozilla.org/en-US/docs/Web/Progressive_web_apps"
target="_blank"
>MDN</a
>): develop & debug like a website, no app store, works (...mostly)
everywhere. Of course, there are some limitations, and each platform
works slightly differently, but it still seems like a nice way to
create simple apps that don't use too many APIs (or prototype them, at
least). I spent a day figuring out how to get a PWA working in iOS,
create notifications, and to trigger notifications from the server.
</p>
<p>
Code, and instructions to run it yourself:
<a
href="https://github.com/ducklol2/web_push_rust_example"
target="_blank"
>web_push_rust_example</a
>
</p>
<p>I used a few dependencies / resources:</p>
<ul>
<li>
<a href="https://docs.rs/axum/latest/axum/" target="_blank">Axum</a
>, a Rust server framework
</li>
<li>
<a href="https://crates.io/crates/web-push/" target="_blank"
>web-push</a
>, a Rust library that communicates with browser's push servers
</li>
<li>
<a href="https://web.dev/explore/notifications" target="_blank"
>The web.dev Notifications documentation</a
>, which explains how everything works
</li>
</ul>
</article>
<hr />
<article id="publishing-local">
<h5>
Oct 7, 2023 | <a href="#publishing-local">🔗</a> |
<a href="https://programming.dev/post/4056355" target="_blank"
>Discuss on Lemmy</a
>
</h5>
<h2>Publishing .local domains, automatically</h2>
<p>
My first thing! I've been playing with random things in Docker
containers on random local devices recently, but I didn't like using
IPs, or ports, or managing DNS servers, or adding DNS entries to all
my clients. I love how Traefik configures itself based on Docker
compose labels, so I made a tool that does the same thing, but for
using mDNS to publish `.local` addresses:
</p>
<p>
<a href="https://github.com/ducklol2/quack_domains" target="_blank"
>github.com/ducklol2/quack_domains</a
>
</p>
<p>
I swear that I looked around for something like this prior to building
it myself, and somehow I didn't find anything - but turns out many
others have built something similar. Check them out too, see what
makes sense to you!
</p>
<ul>
<li>
<a href="https://gitlab.com/viraptor/docker_mdns" target="_blank"
>gitlab.com/viraptor/docker_mdns</a
>
- written in Crystal, runs as a systemd service
</li>
<li>
<a
href="https://github.com/hardillb/traefik-avahi-helper"
target="_blank"
>github.com/hardillb/traefik-avahi-helper</a
>
- written in JS & Python, runs as a container, monitors for changes
</li>
</ul>
</article>
</main>
</body>
</html>