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