var fs = require('fs')
var path = require('path')
...
app.get('/createDirectory/:age/:id', function(req,res) {
fs.mkdirSync(path.join('new', 'papka', req.params.age, req.params.id))
res.json({status: 'created'})
})
...
можно юзать dynamic routes в express