# See the License for the specific language governing permissions and
# limitations under the License.
+module example_simple_logger is example
+
import popcorn
-class LogHandler
+class SimpleLoggerHandler
super Handler
redef fun all(req, res) do print "Request Logged"
end
-class HelloHandler
+class MyOtherHandler
super Handler
redef fun get(req, res) do res.send "Hello World!"
var app = new App
-app.use("/*", new LogHandler)
-app.use("/", new HelloHandler)
+app.use_before("/*", new SimpleLoggerHandler)
+app.use("/", new MyOtherHandler)
app.listen("localhost", 3000)