H4
H4 is a lightweight and delightful http framework written in Dart.
Project LinkMotivation
Dart is a powerful and rich language. I’m exploring the possibility of using dart as my go-to scripting language.
Philosophy
I love the design philosophy of h3.
A small core with a plethora of composable utility functions built in.
Composable utilities have huge advantages compared to traditional plugin/middleware approaches:
- ✅Your server only includes and runs the code that is needed
- ✅ You can extend your server functionality easily without adding global plugins
- ✅ The usage is explicit and clean with less global middleware and plugins
H4 is built for composability and ease of use, as we’ll see in the later parts of this document.
Tutorial
Enough yapping, let’s build something!
Scaffold a dart app
Then install H4
Running the app
Everytime you make changes make sure to run (or re-run) the dart file containing your main function.
Hello World.
Now go to your browser and visit localhost:3000.
Brava!
Hello world!🎉