Skip to content

Commit b3d6448

Browse files
committed
Use ResourceMapper in ensureWelcomePage
1 parent da258d8 commit b3d6448

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

lib/server-config.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,8 @@ function ensureDirCopyExists (fromDir, toDir) {
4040
* @param argv {Object} Express.js app object
4141
*/
4242
async function ensureWelcomePage (argv) {
43-
const { multiuser, templates, server, host } = argv
44-
const rootDir = path.resolve(argv.root)
45-
const serverRootDir = multiuser ? path.join(rootDir, argv.host.hostname) : rootDir
43+
const { resourceMapper, templates, server, host } = argv
44+
const serverRootDir = resourceMapper.getBasePath(host.hostname)
4645
const existingIndexPage = path.join(serverRootDir, 'index.html')
4746
const packageData = require('../package.json')
4847

0 commit comments

Comments
 (0)