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