extracting url parameters like express.js would do