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