Built motion from commit f7863d46.|2.5.41
[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 _0x6fde=['./environment','../mysqldb','get','env','production','appPath','root','public','development','test','set','join','client','use','toISOString','split','views','/server/views','engine','html','ejs','renderFile','json','method-override','errorhandler','passport','moment'];(function(_0x1f06d6,_0x58b95f){var _0xa48fde=function(_0x302836){while(--_0x302836){_0x1f06d6['push'](_0x1f06d6['shift']());}};_0xa48fde(++_0x58b95f);}(_0x6fde,0xef));var _0xe6fd=function(_0x2fe3f2,_0x248d69){_0x2fe3f2=_0x2fe3f2-0x0;var _0x4180ac=_0x6fde[_0x2fe3f2];return _0x4180ac;};'use strict';var express=require('express');var favicon=require('serve-favicon');var bodyParser=require('body-parser');var methodOverride=require(_0xe6fd('0x0'));var cookieParser=require('cookie-parser');var errorHandler=require(_0xe6fd('0x1'));var path=require('path');var passport=require(_0xe6fd('0x2'));var cors=require('cors');var moment=require(_0xe6fd('0x3'));var config=require(_0xe6fd('0x4'));var db=require(_0xe6fd('0x5'))['db'];exports['default']=function(_0x425e22){var _0x2875cb=_0x425e22[_0xe6fd('0x6')](_0xe6fd('0x7'));if(_0x2875cb===_0xe6fd('0x8')){_0x425e22['set'](_0xe6fd('0x9'),path['join'](config[_0xe6fd('0xa')],_0xe6fd('0xb')));}if(_0x2875cb===_0xe6fd('0xc')||_0x2875cb===_0xe6fd('0xd')){_0x425e22[_0xe6fd('0xe')]('appPath',path[_0xe6fd('0xf')](config[_0xe6fd('0xa')],_0xe6fd('0x10')));_0x425e22[_0xe6fd('0x11')](errorHandler());}_0x425e22[_0xe6fd('0xe')]('json\x20replacer',function(_0x5e559b,_0x559322){if(this[_0x5e559b]instanceof Date){_0x559322=this[_0x5e559b][_0xe6fd('0x12')]()[_0xe6fd('0x13')]('.')[0x0]+'Z';}return _0x559322;});_0x425e22['use'](express['static'](_0x425e22['get']('appPath')));_0x425e22[_0xe6fd('0xe')](_0xe6fd('0x14'),config[_0xe6fd('0xa')]+_0xe6fd('0x15'));_0x425e22[_0xe6fd('0x16')](_0xe6fd('0x17'),require(_0xe6fd('0x18'))[_0xe6fd('0x19')]);_0x425e22[_0xe6fd('0xe')]('view\x20engine',_0xe6fd('0x17'));_0x425e22['use'](bodyParser['urlencoded']({'limit':'50mb','extended':!![]}));_0x425e22[_0xe6fd('0x11')](bodyParser[_0xe6fd('0x1a')]({'limit':'50mb'}));_0x425e22[_0xe6fd('0x11')](cors());_0x425e22[_0xe6fd('0x11')](methodOverride());_0x425e22[_0xe6fd('0x11')](cookieParser());_0x425e22['use'](passport['initialize']());};