This will definitely save time, and ensure more uniformity. It moves the `createServiceTester()` calls to a different place from where I'd like them, though I'm happy to have them checked by the linter. Closes #2701
24 lines
373 B
JavaScript
24 lines
373 B
JavaScript
'use strict'
|
|
|
|
const config = require('config').util.toObject()
|
|
const Server = require('./server')
|
|
|
|
function createTestServer({ port }) {
|
|
const serverConfig = {
|
|
...config,
|
|
public: {
|
|
...config.public,
|
|
bind: {
|
|
...config.public.bind,
|
|
port,
|
|
},
|
|
},
|
|
}
|
|
|
|
return new Server(serverConfig)
|
|
}
|
|
|
|
module.exports = {
|
|
createTestServer,
|
|
}
|