Skip to content

[deprecated] Meddle is a middleware stack for use with HttpServer.jl

License

Notifications You must be signed in to change notification settings

JuliaAttic/Meddle.jl

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

41 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Meddle


2015-09-03: This package is deprecated, and does not have an active maintainer. It is not recommended for use in new projects. Commit access may be given to anyone interested in taking on reviving, maintaining, or furthering development. If you are interested, please submit a PR that updates the package. An alternative package is Mux.jl.


Meddle Meddle

Meddle is a middleware stack for use with HttpServer.jl.

Installation: Pkg.add("Meddle")

##Example:

Define a 'stack' of middleware through which incoming Requests are processed:

using HttpServer
using Meddle

stack = middleware(DefaultHeaders, URLDecoder, CookieDecoder, FileServer(pwd()), NotFound)
http = HttpHandler((req, res)->Meddle.handle(stack, MeddleRequest(req, Dict{Symbol,Any}()), res))

for event in split("connect read write close error")
    http.events[event] = (event->(client, args...)->println(client.id,": $event"))(event)
end
http.events["error"] = (client, err)->println(err)
http.events["listen"] = (port)->println("Listening on $port...")

server = Server(http)
run(server, 8000)
:::::::::::::
::         ::
:: Made at ::
::         ::
:::::::::::::
     ::
Hacker School
:::::::::::::

About

[deprecated] Meddle is a middleware stack for use with HttpServer.jl

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages