Built motion from commit 14588770.|2.5.38
[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 _0x4916=['body-parser','method-override','cookie-parser','errorhandler','path','passport','cors','moment','./environment','../mysqldb','default','get','env','production','join','public','development','set','appPath','root','json\x20replacer','split','static','/server/views','html','ejs','renderFile','view\x20engine','use','express','serve-favicon'];(function(_0x373dee,_0x1a8c45){var _0x46798f=function(_0xc389f0){while(--_0xc389f0){_0x373dee['push'](_0x373dee['shift']());}};_0x46798f(++_0x1a8c45);}(_0x4916,0x191));var _0x6491=function(_0x3c9955,_0x2eaee5){_0x3c9955=_0x3c9955-0x0;var _0xc84cfd=_0x4916[_0x3c9955];return _0xc84cfd;};'use strict';var express=require(_0x6491('0x0'));var favicon=require(_0x6491('0x1'));var bodyParser=require(_0x6491('0x2'));var methodOverride=require(_0x6491('0x3'));var cookieParser=require(_0x6491('0x4'));var errorHandler=require(_0x6491('0x5'));var path=require(_0x6491('0x6'));var passport=require(_0x6491('0x7'));var cors=require(_0x6491('0x8'));var moment=require(_0x6491('0x9'));var config=require(_0x6491('0xa'));var db=require(_0x6491('0xb'))['db'];exports[_0x6491('0xc')]=function(_0x1eb7a0){var _0x252af7=_0x1eb7a0[_0x6491('0xd')](_0x6491('0xe'));if(_0x252af7===_0x6491('0xf')){_0x1eb7a0['set']('appPath',path[_0x6491('0x10')](config['root'],_0x6491('0x11')));}if(_0x252af7===_0x6491('0x12')||_0x252af7==='test'){_0x1eb7a0[_0x6491('0x13')](_0x6491('0x14'),path['join'](config[_0x6491('0x15')],'client'));_0x1eb7a0['use'](errorHandler());}_0x1eb7a0[_0x6491('0x13')](_0x6491('0x16'),function(_0x16219f,_0x2e86f2){if(this[_0x16219f]instanceof Date){_0x2e86f2=this[_0x16219f]['toISOString']()[_0x6491('0x17')]('.')[0x0]+'Z';}return _0x2e86f2;});_0x1eb7a0['use'](express[_0x6491('0x18')](_0x1eb7a0[_0x6491('0xd')]('appPath')));_0x1eb7a0[_0x6491('0x13')]('views',config[_0x6491('0x15')]+_0x6491('0x19'));_0x1eb7a0['engine'](_0x6491('0x1a'),require(_0x6491('0x1b'))[_0x6491('0x1c')]);_0x1eb7a0[_0x6491('0x13')](_0x6491('0x1d'),_0x6491('0x1a'));_0x1eb7a0[_0x6491('0x1e')](bodyParser['urlencoded']({'limit':'50mb','extended':!![]}));_0x1eb7a0[_0x6491('0x1e')](bodyParser['json']({'limit':'50mb'}));_0x1eb7a0[_0x6491('0x1e')](cors());_0x1eb7a0[_0x6491('0x1e')](methodOverride());_0x1eb7a0[_0x6491('0x1e')](cookieParser());_0x1eb7a0[_0x6491('0x1e')](passport['initialize']());};