From fc56347c22038b36d9425e9e6396876838e58b18 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bar=C4=B1=C5=9F=20Soner=20U=C5=9Fakl=C4=B1?= Date: Sat, 26 May 2018 13:12:33 -0400 Subject: [PATCH] closes #6520 --- install/web.js | 3 +++ public/src/installer/install.js | 4 ++-- src/views/install/index.tpl | 2 +- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/install/web.js b/install/web.js index c05f2ba849..2f0ef39a42 100644 --- a/install/web.js +++ b/install/web.js @@ -38,6 +38,7 @@ var scripts = [ var installing = false; var success = false; var error = false; +var launchUrl; web.install = function (port) { port = port || 4567; @@ -105,6 +106,7 @@ function welcome(req, res) { res.render('install/index', { url: nconf.get('url') || (req.protocol + '://' + req.get('host')), + launchUrl: launchUrl, skipGeneralSetup: !!nconf.get('url'), databases: databases, skipDatabaseSetup: !!nconf.get('database'), @@ -144,6 +146,7 @@ function install(req, res) { winston.info('Starting setup process'); winston.info(setupEnvVars); + launchUrl = setupEnvVars.url; var child = require('child_process').fork('app', ['--setup'], { env: setupEnvVars, diff --git a/public/src/installer/install.js b/public/src/installer/install.js index 596d6404db..6c912f00ac 100644 --- a/public/src/installer/install.js +++ b/public/src/installer/install.js @@ -118,11 +118,11 @@ $('document').ready(function () { function launchForum() { $('#launch .working').removeClass('hide'); - $.post('/launch', function () { var successCount = 0; + var url = $('#launch').attr('data-url'); setInterval(function () { - $.get('/admin').done(function () { + $.get(url + '/admin').done(function () { if (successCount >= 5) { window.location = 'admin'; } else { diff --git a/src/views/install/index.tpl b/src/views/install/index.tpl index 43b0ae3573..f24231b952 100644 --- a/src/views/install/index.tpl +++ b/src/views/install/index.tpl @@ -128,7 +128,7 @@

Congratulations! Your NodeBB has been set-up.

- +