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_query_string is example
import popcorn
import template
class QueryStringHandler
super Handler
redef fun get(req, res) do
var tpl = new Template
tpl.addn "URI: {req.uri}"
tpl.addn "Query string: {req.query_string}"
for name, arg in req.get_args do
tpl.addn "{name}: {arg}"
end
res.send tpl
end
end
var app = new App
app.use("/", new QueryStringHandler)
app.listen("localhost", 3000)
lib/popcorn/examples/handlers/example_query_string.nit:17,1--38,29