Built motion from commit 88d8eb5.|1.0.14
[motion.git] / server / app.js
1 var _0x7431=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x4E\x4F\x44\x45\x5F\x45\x4E\x56","\x65\x6E\x76","\x64\x65\x76\x65\x6C\x6F\x70\x6D\x65\x6E\x74","\x4E\x4F\x44\x45\x5F\x54\x4C\x53\x5F\x52\x45\x4A\x45\x43\x54\x5F\x55\x4E\x41\x55\x54\x48\x4F\x52\x49\x5A\x45\x44","\x75\x6E\x63\x61\x75\x67\x68\x74\x45\x78\x63\x65\x70\x74\x69\x6F\x6E","\x6F\x62\x6A\x65\x63\x74","\x6D\x65\x73\x73\x61\x67\x65","\x0A\x4D\x65\x73\x73\x61\x67\x65\x3A\x20","\x6C\x6F\x67","\x73\x74\x61\x63\x6B","\x0A\x53\x74\x61\x63\x6B\x74\x72\x61\x63\x65\x3A","\x3D\x3D\x3D\x3D\x3D\x3D\x3D\x3D\x3D\x3D\x3D\x3D\x3D\x3D\x3D\x3D\x3D\x3D\x3D\x3D","\x64\x75\x6D\x70\x45\x72\x72\x6F\x72\x20\x3A\x3A\x20\x61\x72\x67\x75\x6D\x65\x6E\x74\x20\x69\x73\x20\x6E\x6F\x74\x20\x61\x6E\x20\x6F\x62\x6A\x65\x63\x74","\x6F\x6E","\x68\x74\x74\x70","\x43\x72\x6F\x6E\x4A\x6F\x62","\x63\x72\x6F\x6E","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x73\x6F\x63\x6B\x65\x74\x2E\x69\x6F","\x73\x6F\x63\x6B\x65\x74\x2E\x69\x6F\x2D\x72\x65\x64\x69\x73","\x6D\x6F\x6D\x65\x6E\x74","\x63\x72\x65\x61\x74\x65\x53\x65\x72\x76\x65\x72","\x70\x6F\x72\x74","\x69\x70","\x45\x78\x70\x72\x65\x73\x73\x20\x73\x65\x72\x76\x65\x72\x20\x6C\x69\x73\x74\x65\x6E\x69\x6E\x67\x20\x6F\x6E\x20\x25\x64\x2C\x20\x69\x6E\x20\x25\x73\x20\x6D\x6F\x64\x65","\x67\x65\x74","\x6C\x69\x73\x74\x65\x6E","\x70\x72\x6F\x64\x75\x63\x74\x69\x6F\x6E","\x2F\x73\x6F\x63\x6B\x65\x74\x2E\x69\x6F\x2D\x63\x6C\x69\x65\x6E\x74","\x72\x65\x64\x69\x73\x50\x77\x64","\x63\x72\x65\x61\x74\x65\x43\x6C\x69\x65\x6E\x74","\x72\x65\x64\x69\x73","\x61\x64\x61\x70\x74\x65\x72","\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x78\x70\x72\x65\x73\x73","\x74\x69\x6D\x65\x7A\x6F\x6E\x65","\x78\x63\x61\x6C\x6C\x79\x2D\x6D\x6F\x74\x69\x6F\x6E\x2D\x74\x69\x6D\x65\x7A\x6F\x6E\x65","","\x54\x69\x6D\x65\x7A\x6F\x6E\x65\x20\x73\x65\x74\x3A","\x5A","\x66\x6F\x72\x6D\x61\x74","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x68\x69\x73\x74\x6F\x72\x79\x2F\x68\x69\x73\x74\x6F\x72\x79","\x74\x68\x65\x6E","\x73\x79\x6E\x63","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65\x5F\x72\x65\x61\x64\x4F\x6E\x6C\x79","\x73\x65\x65\x64\x44\x42","\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x73\x65\x65\x64","\x73\x65\x65\x64\x50\x44\x42","\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x73\x65\x65\x64\x70","\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x61\x6D\x69","\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x73\x6F\x63\x6B\x65\x74\x69\x6F","\x2E\x2F\x72\x6F\x75\x74\x65\x73","\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x61\x75\x74\x6F\x6D\x61\x74\x69\x6F\x6E\x73\x2F\x6D\x61\x69\x6C","\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x61\x75\x74\x6F\x6D\x61\x74\x69\x6F\x6E\x73\x2F\x66\x61\x78","\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x61\x75\x74\x6F\x6D\x61\x74\x69\x6F\x6E\x73\x2F\x63\x68\x61\x74","\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x73\x63\x68\x65\x64\x75\x6C\x65\x72","\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x69\x6D\x61\x70","\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x73\x6D\x74\x70","\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x73\x6D\x73","\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x63\x68\x61\x74","\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C","\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x74\x6F\x6F\x6C\x73","\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x61\x67\x69","\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x69\x63\x65\x6E\x73\x65","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0x7431[0];process[_0x7431[2]][_0x7431[1]]= process[_0x7431[2]][_0x7431[1]]|| _0x7431[3];process[_0x7431[2]][_0x7431[4]]= 0;process[_0x7431[14]](_0x7431[5],function(_0xe157x1){if( typeof _0xe157x1=== _0x7431[6]){if(_0xe157x1[_0x7431[7]]){console[_0x7431[9]](_0x7431[8]+ _0xe157x1[_0x7431[7]])};if(_0xe157x1[_0x7431[10]]){console[_0x7431[9]](_0x7431[11]);console[_0x7431[9]](_0x7431[12]);console[_0x7431[9]](_0xe157x1[_0x7431[10]])}}else {console[_0x7431[9]](_0x7431[13])}});var http=require(_0x7431[15]);var cronjob=require(_0x7431[17])[_0x7431[16]];var express=require(_0x7431[18]);var config=require(_0x7431[19]);var models=require(_0x7431[20]);var sio=require(_0x7431[21]);var sio_redis=require(_0x7431[22]);var moment=require(_0x7431[23]);var app=express();var server=http[_0x7431[24]](app);server[_0x7431[29]](config[_0x7431[25]],config[_0x7431[26]],function(){console[_0x7431[9]](_0x7431[27],config[_0x7431[25]],app[_0x7431[28]](_0x7431[2]))});var io=sio(server,{serveClient:(config[_0x7431[2]]=== _0x7431[30])?false:true,path:_0x7431[31]});if(config[_0x7431[32]]){var redis=require(_0x7431[34])[_0x7431[33]];var pub=redis(6379,config[_0x7431[26]],{password:config[_0x7431[32]]});var sub=redis(6379,config[_0x7431[26]],{return_buffers:true,password:config[_0x7431[32]]});io[_0x7431[35]](sio_redis({pubClient:pub,subClient:sub}))}else {io[_0x7431[35]](sio_redis({host:config[_0x7431[26]],port:6379}))};require(_0x7431[36])(app);if(config[_0x7431[37]]&& config[_0x7431[37]]== _0x7431[38]){config[_0x7431[37]]= _0x7431[39]};console[_0x7431[9]](_0x7431[40],config[_0x7431[37]]|| moment()[_0x7431[42]](_0x7431[41]));var ami;models[_0x7431[68]][_0x7431[47]]()[_0x7431[46]](function(){if(config[_0x7431[49]]){require(_0x7431[50])};if(config[_0x7431[51]]){require(_0x7431[52])};ami= require(_0x7431[53])();var _0xe157x11=require(_0x7431[54])(io);require(_0x7431[55])(app,ami,_0xe157x11);require(_0x7431[56])();require(_0x7431[57])();require(_0x7431[58])();require(_0x7431[59])();require(_0x7431[60])(ami);require(_0x7431[61])();require(_0x7431[62])();require(_0x7431[63])();require(_0x7431[64])();require(_0x7431[65])();require(_0x7431[66])(ami);require(_0x7431[67])()})[_0x7431[46]](function(){return models[_0x7431[48]][_0x7431[47]]()})[_0x7431[46]](function(){require(_0x7431[45])(cronjob,ami)})[_0x7431[44]](function(_0xe157x1){console[_0x7431[43]](_0xe157x1)});exports= module[_0x7431[69]]= app