Is this code break SOLID principles and bad practice because it has side effect? ?
var app = exports = module.exports = {};
app.prototype = Object.create(expressApp.prototype);
app.config = function config() {
this.set("trust proxy", true);
this.use(someMiddleware)
this.use(json());
}
And I will use it like that
const {app} = require('file')
app.config()
Instead of copying and pasting same code over and over