Built motion from commit (unavailable).|2.5.27
[motion2.git] / server / config / express.js
1 // *************************************************************************
2 // *                                                                       *
3 // * xCALLY Motion -  The Omnichannel Contact Center                       *
4 // * Copyright (c) Xenialab s.r.l. All Rights Reserved                     *
5 // *                                                                       *
6 // *************************************************************************
7 // *                                                                       *
8 // * Email: info@xcally.com                                                *
9 // * Website: https://www.xcally.com                                       *
10 // *                                                                       *
11 // *************************************************************************
12 // *                                                                       *
13 // * The SOFTWARE PRODUCT is protected by copyright laws and international *
14 // * copyright treaties, as well as other intellectual property laws and   *
15 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                         *
16 // *                                                                       *
17 // *************************************************************************
18 var _0xf39b=['view\x20engine','html','urlencoded','50mb','json','initialize','express','serve-favicon','body-parser','cookie-parser','path','cors','moment','../mysqldb','default','get','env','production','set','appPath','root','public','development','test','join','use','toISOString','split','static','/server/views','engine','ejs','renderFile'];(function(_0x167cc1,_0x56ef5a){var _0x10bc4b=function(_0xd6a255){while(--_0xd6a255){_0x167cc1['push'](_0x167cc1['shift']());}};_0x10bc4b(++_0x56ef5a);}(_0xf39b,0x192));var _0xbf39=function(_0xb42bd2,_0x18c572){_0xb42bd2=_0xb42bd2-0x0;var _0xbc4c35=_0xf39b[_0xb42bd2];return _0xbc4c35;};'use strict';var express=require(_0xbf39('0x0'));var favicon=require(_0xbf39('0x1'));var bodyParser=require(_0xbf39('0x2'));var methodOverride=require('method-override');var cookieParser=require(_0xbf39('0x3'));var errorHandler=require('errorhandler');var path=require(_0xbf39('0x4'));var passport=require('passport');var cors=require(_0xbf39('0x5'));var moment=require(_0xbf39('0x6'));var config=require('./environment');var db=require(_0xbf39('0x7'))['db'];exports[_0xbf39('0x8')]=function(_0x36974c){var _0x2a94e6=_0x36974c[_0xbf39('0x9')](_0xbf39('0xa'));if(_0x2a94e6===_0xbf39('0xb')){_0x36974c[_0xbf39('0xc')](_0xbf39('0xd'),path['join'](config[_0xbf39('0xe')],_0xbf39('0xf')));}if(_0x2a94e6===_0xbf39('0x10')||_0x2a94e6===_0xbf39('0x11')){_0x36974c['set'](_0xbf39('0xd'),path[_0xbf39('0x12')](config[_0xbf39('0xe')],'client'));_0x36974c[_0xbf39('0x13')](errorHandler());}_0x36974c['set']('json\x20replacer',function(_0x5d3575,_0x23ef97){if(this[_0x5d3575]instanceof Date){_0x23ef97=this[_0x5d3575][_0xbf39('0x14')]()[_0xbf39('0x15')]('.')[0x0]+'Z';}return _0x23ef97;});_0x36974c['use'](express[_0xbf39('0x16')](_0x36974c[_0xbf39('0x9')](_0xbf39('0xd'))));_0x36974c['set']('views',config[_0xbf39('0xe')]+_0xbf39('0x17'));_0x36974c[_0xbf39('0x18')]('html',require(_0xbf39('0x19'))[_0xbf39('0x1a')]);_0x36974c[_0xbf39('0xc')](_0xbf39('0x1b'),_0xbf39('0x1c'));_0x36974c[_0xbf39('0x13')](bodyParser[_0xbf39('0x1d')]({'limit':_0xbf39('0x1e'),'extended':!![]}));_0x36974c[_0xbf39('0x13')](bodyParser[_0xbf39('0x1f')]({'limit':_0xbf39('0x1e')}));_0x36974c['use'](cors());_0x36974c[_0xbf39('0x13')](methodOverride());_0x36974c[_0xbf39('0x13')](cookieParser());_0x36974c['use'](passport[_0xbf39('0x20')]());};