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