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