a router middleware for expressjs