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