Articles tagged #webdev
Doing geo-location and keeping analytics
I sold you on some additional functionality for catscii
last chapter, and we
got caught up in private registry / docker shenanigans, so, now, let's resume
web development as promised.
Adding geolocation
We kinda left the locat
crate stubby, it doesn't actually do any IP to
location lookups. It doesn't even have a dependency on a crate that do
that.
Serving ASCII cats over HTTP
Our catscii
program does everything we want it to do, except that it's a
command-line application rather than a web server. Let's fix that.
Enter axum
The documentation for the axum crate tells us how to make a basic web server, and we honestly don't need much more than that.
So let's add axum:
amos@miles:~/catscii$ cargo add axum@0.6
Updating crates.io index
Adding axum =0.6 to dependencies.
Features:
+ form
+ http1
+ json
+ matched-path
+ original-uri
+ query
+ tokio
+ tower-log
- __private_docs
- headers
- http2
- macros
- multipart
- w
Updating fasterthanli.me for 2022
In 2020, I switched from a static site generator to something homemade.
And, as tradition commands, I did a whole write-up about it.
Since writing articles and making videos is now my full-time
occupation, I took some time
to upgrade futile
, my server software, to the latest and greatest the
Rust ecosystem has to offer.
Go back to the homepage.