minor changes

This commit is contained in:
coderaiser 2013-03-11 11:50:26 -04:00
parent cb4a0da345
commit 3df7d0dba6
2 changed files with 10 additions and 6 deletions

View file

@ -74,11 +74,13 @@ var CloudCommander, Util, DOM, CodeMirror;
lineWrapping: false,
autofocus : true,
extraKeys: {
//Сохранение
/* Exit */
'Esc': function(){
Util.exec(pParams);
DOM.remove(lCSS, document.head);
},
/* Save */
'Ctrl-S': function(){
var lValue = lEditor.getValue();

View file

@ -76,6 +76,8 @@
lSSL = pProcessing.ssl,
lSSLPort = lConfig.sslPort,
lHTTP = 'http://',
lHTTPS = 'https://',
lSockets = function(pServer){
var lListen;
@ -91,24 +93,24 @@
Util.log(pError);
});
Server.listen(lPort, lIP);
lServerLog('http', lPort);
lServerLog(lHTTP, lPort);
lSockets(Server);
},
lServerLog = function(pHTTP, pPort){
Util.log('* Server running at ' + pHTTP + '://' + lIP + ':' + pPort);
Util.log('* Server running at ' + pHTTP + lIP + ':' + pPort);
};
/* server mode or testing mode */
if (lConfig.server) {
if(lSSL){
Util.log('* Redirection http -> https is setted up');
lServerLog('http', lPort);
lServerLog(lHTTP, lPort);
var lRedirectServer = http.createServer( function(pReq, pRes){
var lHost = pReq.headers.host;
main.redirect({
response: pRes,
url: 'https://' + lHost + pReq.url
url: lHTTPS + lHost + pReq.url
});
});
@ -126,7 +128,7 @@
lSockets(Server);
Server.listen(lSSLPort, lIP);
lServerLog('https', lSSLPort);
lServerLog(lHTTPS, lSSLPort);
}
else
lHTTPServer();