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