Built motion from commit (unavailable).|2.5.8
[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 _0x2776=['test','json\x20replacer','toISOString','split','static','views','/server/views','engine','html','renderFile','view\x20engine','urlencoded','50mb','use','express','body-parser','method-override','cookie-parser','path','moment','./environment','../mysqldb','default','get','set','appPath','join','root','public'];(function(_0xf31c60,_0x22978b){var _0x29f6f1=function(_0x1551ec){while(--_0x1551ec){_0xf31c60['push'](_0xf31c60['shift']());}};_0x29f6f1(++_0x22978b);}(_0x2776,0x187));var _0x6277=function(_0x177193,_0x39f408){_0x177193=_0x177193-0x0;var _0xee98cb=_0x2776[_0x177193];return _0xee98cb;};'use strict';var express=require(_0x6277('0x0'));var favicon=require('serve-favicon');var bodyParser=require(_0x6277('0x1'));var methodOverride=require(_0x6277('0x2'));var cookieParser=require(_0x6277('0x3'));var errorHandler=require('errorhandler');var path=require(_0x6277('0x4'));var passport=require('passport');var cors=require('cors');var moment=require(_0x6277('0x5'));var config=require(_0x6277('0x6'));var db=require(_0x6277('0x7'))['db'];exports[_0x6277('0x8')]=function(_0x51b831){var _0x5426ee=_0x51b831[_0x6277('0x9')]('env');if(_0x5426ee==='production'){_0x51b831[_0x6277('0xa')](_0x6277('0xb'),path[_0x6277('0xc')](config[_0x6277('0xd')],_0x6277('0xe')));}if(_0x5426ee==='development'||_0x5426ee===_0x6277('0xf')){_0x51b831[_0x6277('0xa')](_0x6277('0xb'),path[_0x6277('0xc')](config['root'],'client'));_0x51b831['use'](errorHandler());}_0x51b831[_0x6277('0xa')](_0x6277('0x10'),function(_0x1b66c5,_0x36f509){if(this[_0x1b66c5]instanceof Date){_0x36f509=this[_0x1b66c5][_0x6277('0x11')]()[_0x6277('0x12')]('.')[0x0]+'Z';}return _0x36f509;});_0x51b831['use'](express[_0x6277('0x13')](_0x51b831[_0x6277('0x9')](_0x6277('0xb'))));_0x51b831[_0x6277('0xa')](_0x6277('0x14'),config[_0x6277('0xd')]+_0x6277('0x15'));_0x51b831[_0x6277('0x16')](_0x6277('0x17'),require('ejs')[_0x6277('0x18')]);_0x51b831[_0x6277('0xa')](_0x6277('0x19'),_0x6277('0x17'));_0x51b831['use'](bodyParser[_0x6277('0x1a')]({'limit':_0x6277('0x1b'),'extended':!![]}));_0x51b831[_0x6277('0x1c')](bodyParser['json']({'limit':_0x6277('0x1b')}));_0x51b831[_0x6277('0x1c')](cors());_0x51b831[_0x6277('0x1c')](methodOverride());_0x51b831[_0x6277('0x1c')](cookieParser());_0x51b831['use'](passport['initialize']());};