Built motion from commit (unavailable).|2.5.2
[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 _0x0b2f=['express','serve-favicon','body-parser','cookie-parser','errorhandler','passport','cors','moment','./environment','../mysqldb','default','env','production','join','root','public','development','test','appPath','use','set','json\x20replacer','toISOString','split','get','/server/views','html','ejs','renderFile','view\x20engine','urlencoded','50mb','initialize'];(function(_0x14add3,_0x13ce8d){var _0x4a174f=function(_0x2b3ed7){while(--_0x2b3ed7){_0x14add3['push'](_0x14add3['shift']());}};_0x4a174f(++_0x13ce8d);}(_0x0b2f,0x18c));var _0xf0b2=function(_0x16d954,_0x12c0bc){_0x16d954=_0x16d954-0x0;var _0x3551d3=_0x0b2f[_0x16d954];return _0x3551d3;};'use strict';var express=require(_0xf0b2('0x0'));var favicon=require(_0xf0b2('0x1'));var bodyParser=require(_0xf0b2('0x2'));var methodOverride=require('method-override');var cookieParser=require(_0xf0b2('0x3'));var errorHandler=require(_0xf0b2('0x4'));var path=require('path');var passport=require(_0xf0b2('0x5'));var cors=require(_0xf0b2('0x6'));var moment=require(_0xf0b2('0x7'));var config=require(_0xf0b2('0x8'));var db=require(_0xf0b2('0x9'))['db'];exports[_0xf0b2('0xa')]=function(_0x3a7344){var _0x3e4595=_0x3a7344['get'](_0xf0b2('0xb'));if(_0x3e4595===_0xf0b2('0xc')){_0x3a7344['set']('appPath',path[_0xf0b2('0xd')](config[_0xf0b2('0xe')],_0xf0b2('0xf')));}if(_0x3e4595===_0xf0b2('0x10')||_0x3e4595===_0xf0b2('0x11')){_0x3a7344['set'](_0xf0b2('0x12'),path[_0xf0b2('0xd')](config[_0xf0b2('0xe')],'client'));_0x3a7344[_0xf0b2('0x13')](errorHandler());}_0x3a7344[_0xf0b2('0x14')](_0xf0b2('0x15'),function(_0x597bc3,_0x2dc941){if(this[_0x597bc3]instanceof Date){_0x2dc941=this[_0x597bc3][_0xf0b2('0x16')]()[_0xf0b2('0x17')]('.')[0x0]+'Z';}return _0x2dc941;});_0x3a7344[_0xf0b2('0x13')](express['static'](_0x3a7344[_0xf0b2('0x18')](_0xf0b2('0x12'))));_0x3a7344[_0xf0b2('0x14')]('views',config['root']+_0xf0b2('0x19'));_0x3a7344['engine'](_0xf0b2('0x1a'),require(_0xf0b2('0x1b'))[_0xf0b2('0x1c')]);_0x3a7344[_0xf0b2('0x14')](_0xf0b2('0x1d'),_0xf0b2('0x1a'));_0x3a7344[_0xf0b2('0x13')](bodyParser[_0xf0b2('0x1e')]({'limit':'50mb','extended':!![]}));_0x3a7344[_0xf0b2('0x13')](bodyParser['json']({'limit':_0xf0b2('0x1f')}));_0x3a7344[_0xf0b2('0x13')](cors());_0x3a7344[_0xf0b2('0x13')](methodOverride());_0x3a7344[_0xf0b2('0x13')](cookieParser());_0x3a7344[_0xf0b2('0x13')](passport[_0xf0b2('0x20')]());};