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