Function to add an event listener

on(jug, event, func, ...)

Arguments

jug

the jug instance

event

the event to bind to (one of start, finish or error)

func

the function to pass the req, res, err and (if error event) the err_msg to

...

extra arguments to pass to the listener function

See also

post, put, delete, use, ws