(function() { 'use strict'; var DIR = __dirname + '/', DIR_SERVER = DIR + 'lib/server/', main = require(DIR_SERVER + 'main'), format = require(DIR_SERVER + 'format'), mellow = require(DIR_SERVER + 'mellow'), HTMLDIR = main.HTMLDIR, JSONDIR = main.JSONDIR, fs = main.fs, files = main.files, CloudFunc = main.cloudfunc, AppCache = main.appcache, Util = main.util, update = main.update, server = main.librequire('server'), Minify = main.minify, Config = main.config, win = require(DIR_SERVER + 'win'), CONFIG_PATH = JSONDIR + 'config.json', KEY = DIR + 'ssl/ssl.key', CERT = DIR + 'ssl/ssl.crt', HTML_FS_DIR = HTMLDIR + 'fs/', PATH_INDEX = HTML_FS_DIR + 'index.html', TMPL_PATH = [ 'file', 'panel', 'path', 'pathLink', 'link', ], IsTest, Template = {}, FS = CloudFunc.FS; /* reinit main dir os if we on Win32 should be backslashes */ DIR = main.DIR; exports.start = function(params) { IsTest = params.isTest; readConfig(init); win.prepareCodePage(); }; /** * additional processing of index file */ function indexProcessing(options) { var keysPanel, left, right, LEFT = CloudFunc.PANEL_LEFT, RIGHT = CloudFunc.PANEL_RIGHT, data = options.data, panel = options.panel; if (!Config.appCache) data = Util.rmStr(data, [ /* min */ ' manifest=/cloudcmd.appcache', /* normal */ ' manifest="/cloudcmd.appcache"' ]); if (!Config.showKeysPanel) { keysPanel = '