FileServer
action, which is a standard and minimal file server
HttpRequest
class and services to create it
Serializable::inspect
to show more useful information
more_collections :: more_collections
Highly specific, but useful, collections-related classes.serialization :: serialization_core
Abstract services to serialize Nit objects to different formatscore :: union_find
union–find algorithm using an efficient disjoint-set data structure
module example_param_route is example
import popcorn
class UserHome
super Handler
redef fun get(req, res) do
var user = req.param("user")
if user != null then
res.send "Hello {user}"
else
res.send("Nothing received", 400)
end
end
end
var app = new App
app.use("/:user", new UserHome)
app.listen("localhost", 3000)
lib/popcorn/examples/routing/example_param_route.nit:17,1--36,29