Built motion from commit (unavailable).|2.5.10
[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 _0x78e7=['join','use','json\x20replacer','toISOString','static','views','html','renderFile','view\x20engine','urlencoded','50mb','initialize','express','body-parser','method-override','cookie-parser','errorhandler','passport','./environment','../mysqldb','default','get','production','set','appPath','development','test'];(function(_0x35b18a,_0x6b2fbe){var _0x4db1bd=function(_0x389e62){while(--_0x389e62){_0x35b18a['push'](_0x35b18a['shift']());}};_0x4db1bd(++_0x6b2fbe);}(_0x78e7,0x1f2));var _0x778e=function(_0x367e59,_0x41e538){_0x367e59=_0x367e59-0x0;var _0x18c626=_0x78e7[_0x367e59];return _0x18c626;};'use strict';var express=require(_0x778e('0x0'));var favicon=require('serve-favicon');var bodyParser=require(_0x778e('0x1'));var methodOverride=require(_0x778e('0x2'));var cookieParser=require(_0x778e('0x3'));var errorHandler=require(_0x778e('0x4'));var path=require('path');var passport=require(_0x778e('0x5'));var cors=require('cors');var moment=require('moment');var config=require(_0x778e('0x6'));var db=require(_0x778e('0x7'))['db'];exports[_0x778e('0x8')]=function(_0x5daf17){var _0x3a40e2=_0x5daf17[_0x778e('0x9')]('env');if(_0x3a40e2===_0x778e('0xa')){_0x5daf17[_0x778e('0xb')](_0x778e('0xc'),path['join'](config['root'],'public'));}if(_0x3a40e2===_0x778e('0xd')||_0x3a40e2===_0x778e('0xe')){_0x5daf17[_0x778e('0xb')](_0x778e('0xc'),path[_0x778e('0xf')](config['root'],'client'));_0x5daf17[_0x778e('0x10')](errorHandler());}_0x5daf17[_0x778e('0xb')](_0x778e('0x11'),function(_0x2fd116,_0x159109){if(this[_0x2fd116]instanceof Date){_0x159109=this[_0x2fd116][_0x778e('0x12')]()['split']('.')[0x0]+'Z';}return _0x159109;});_0x5daf17[_0x778e('0x10')](express[_0x778e('0x13')](_0x5daf17[_0x778e('0x9')](_0x778e('0xc'))));_0x5daf17['set'](_0x778e('0x14'),config['root']+'/server/views');_0x5daf17['engine'](_0x778e('0x15'),require('ejs')[_0x778e('0x16')]);_0x5daf17[_0x778e('0xb')](_0x778e('0x17'),_0x778e('0x15'));_0x5daf17[_0x778e('0x10')](bodyParser[_0x778e('0x18')]({'limit':_0x778e('0x19'),'extended':!![]}));_0x5daf17[_0x778e('0x10')](bodyParser['json']({'limit':'50mb'}));_0x5daf17[_0x778e('0x10')](cors());_0x5daf17[_0x778e('0x10')](methodOverride());_0x5daf17[_0x778e('0x10')](cookieParser());_0x5daf17[_0x778e('0x10')](passport[_0x778e('0x1a')]());};