mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-01-06 15:42:52 +01:00
installer - finally got it all working ;)
This commit is contained in:
@@ -96,10 +96,19 @@ function install(req, res) {
|
||||
}
|
||||
|
||||
function launch(req, res) {
|
||||
var pidFilePath = __dirname + '../pidfile';
|
||||
res.json({});
|
||||
|
||||
server.close();
|
||||
require('child_process').fork('app', [], {});
|
||||
|
||||
var child = require('child_process').spawn('node', ['app.js'], {
|
||||
detached: true,
|
||||
stdio: ['ignore', 'ignore', 'ignore']
|
||||
});
|
||||
|
||||
fs.writeFile(__dirname + '../pidfile', child.pid, function() {
|
||||
child.unref();
|
||||
process.exit(0);
|
||||
});
|
||||
}
|
||||
|
||||
function compileLess(callback) {
|
||||
|
||||
@@ -114,7 +114,11 @@ $('document').ready(function() {
|
||||
$('#launch .fa-spin').removeClass('hide');
|
||||
|
||||
$.post('/launch', function() {
|
||||
console.log('launched');
|
||||
setInterval(function() {
|
||||
$.get('/admin', function(data) {
|
||||
window.location = 'admin';
|
||||
});
|
||||
}, 750);
|
||||
});
|
||||
}
|
||||
});
|
||||
Reference in New Issue
Block a user