Removed GET check, no longer needed at this point
This commit is contained in:
parent
9d6fac6a67
commit
ada976c4fb
1 changed files with 5 additions and 12 deletions
|
|
@ -54,19 +54,12 @@ var server = http.createServer(app);
|
||||||
|
|
||||||
app.use('/', php.cgi(phpinfo));
|
app.use('/', php.cgi(phpinfo));
|
||||||
|
|
||||||
server.listen(port, host, function(){
|
server.listen(port, host, function(res){
|
||||||
var url = 'http://'+host+':'+server.address().port+'/';
|
var url = 'http://'+host+':'+server.address().port+'/';
|
||||||
|
changeState('Starting application...', '#00CD00');
|
||||||
http.get(url, function(res) {
|
window.location = url;
|
||||||
if(res.statusCode == 200) {
|
}).on('error', function(e) {
|
||||||
changeState('Starting application...', '#00CD00');
|
changeState('<strong>ERROR: '+e.message+'</strong>', '#CD0000');
|
||||||
} else {
|
|
||||||
changeState('Starting application with error code '+res.statusCode, '#FCD116');
|
|
||||||
}
|
|
||||||
window.location = url;
|
|
||||||
}).on('error', function(e) {
|
|
||||||
changeState('<strong>ERROR: '+e.message+'</strong>', '#CD0000');
|
|
||||||
});
|
|
||||||
});
|
});
|
||||||
|
|
||||||
function changeState(msg, color){
|
function changeState(msg, color){
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue