1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | 28x 28x 28x 136x 131x | const server = require('../'); const instance = require('./instance'); // Parse the server options module.exports = (opts = {}, general = {}, defaults = {}) => { // A server.js instance or the promise of it, just return it if (instance(opts)) return opts; // Be able to set global variables from outside return Object.assign({}, defaults, general, opts, { env: undefined, secret: undefined }); }; |