[__dirname, 'orm', model, 'js'].join(path.sep) would produce something like src/models/orm/User/js

[__dirname, 'orm', model + 'js'].join(path.sep) would work