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