add route and global middleware