Built motion from commit (unavailable).|2.5.2
[motion2.git] / server / app.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 _0x248a=['join','Offline\x20apps:','map','status','online','seedDB','./config/seedDB','default','./config/license','catch','error','Server\x20failed\x20to\x20start\x20due\x20to\x20error:\x20%s','exit','lodash','./mysqldb','./rpc','./config/environment','./config/logger','app','./config/pm2','./config/pm2/config','./config/schedule','./config/schedule/chat','./config/schedule/transcribe','then','listen','info','start','filter','name'];(function(_0xf67029,_0x450c0b){var _0x582d44=function(_0x426114){while(--_0x426114){_0xf67029['push'](_0xf67029['shift']());}};_0x582d44(++_0x450c0b);}(_0x248a,0x157));var _0xa248=function(_0x49ed74,_0x76ef57){_0x49ed74=_0x49ed74-0x0;var _0x16ae83=_0x248a[_0x49ed74];return _0x16ae83;};'use strict';var _=require(_0xa248('0x0'));var mysqldb=require(_0xa248('0x1'));var rpc=require(_0xa248('0x2'));var config=require(_0xa248('0x3'));var logger=require(_0xa248('0x4'))(_0xa248('0x5'));var pm2=require(_0xa248('0x6'));var pm2Config=require(_0xa248('0x7'));var schedule=require(_0xa248('0x8'));var chat=require(_0xa248('0x9'));var transcribe=require(_0xa248('0xa'));function main(){return mysqldb['db']['sequelize']['sync']()[_0xa248('0xb')](function(){return rpc[_0xa248('0xc')]();})[_0xa248('0xb')](function(_0x79daea){logger[_0xa248('0xd')](_0x79daea);return chat['start']();})[_0xa248('0xb')](function(){return schedule[_0xa248('0xe')]();})[_0xa248('0xb')](function(){return transcribe['start']();})[_0xa248('0xb')](function(_0x5d677a){logger['info'](_0x5d677a);return pm2[_0xa248('0xe')](pm2Config);})[_0xa248('0xb')](function(_0x11b95c){logger['info']('Online\x20apps:',_['map'](_[_0xa248('0xf')](_0x11b95c,{'status':'online'}),_0xa248('0x10'))[_0xa248('0x11')]());logger[_0xa248('0xd')](_0xa248('0x12'),_[_0xa248('0x13')](_[_0xa248('0xf')](_0x11b95c,function(_0x523224){return _0x523224[_0xa248('0x14')]!==_0xa248('0x15');}),'name')['join']()||'None');config[_0xa248('0x16')]&&require(_0xa248('0x17'))[_0xa248('0x18')]();require(_0xa248('0x19'))['default']();})[_0xa248('0x1a')](function(_0x408607){logger[_0xa248('0x1b')](_0xa248('0x1c'),_0x408607);process[_0xa248('0x1d')](0x1);});}main();