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_simple_logger is example
import popcorn
class SimpleLoggerHandler
super Handler
redef fun all(req, res) do print "Request Logged"
end
class MyOtherHandler
super Handler
redef fun get(req, res) do res.send "Hello World!"
end
var app = new App
app.use_before("/*", new SimpleLoggerHandler)
app.use("/", new MyOtherHandler)
app.listen("localhost", 3000)
lib/popcorn/examples/middlewares/example_simple_logger.nit:17,1--37,29