v1.18.x
Barış Soner Uşaklı 7 years ago
parent 229e49cf8f
commit fc56347c22

@ -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,

@ -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 {

@ -128,7 +128,7 @@
<p>
<h1>Congratulations! Your NodeBB has been set-up.</h1>
<button id="launch" class="btn btn-lg btn-success">Launch NodeBB <i class="working hide"></i></button>
<button id="launch" data-url="{launchUrl}" class="btn btn-lg btn-success">Launch NodeBB <i class="working hide"></i></button>
</p>
</div>

Loading…
Cancel
Save