tinygame.xyz
Advanced tools
Comparing version 1.6.41 to 1.6.42
{ | ||
"name": "tinygame.xyz", | ||
"version": "1.6.41", | ||
"version": "1.6.42", | ||
"main": "index.js", | ||
@@ -5,0 +5,0 @@ "dependencies": {}, |
@@ -78,3 +78,3 @@ var express = require('express'); | ||
var message = req.weixin; | ||
//console.log(message); | ||
console.log(message); | ||
if (message.MsgType === 'text' && message.Content === 'h') { | ||
@@ -81,0 +81,0 @@ res.reply('回复任意数字,带给您一天好心情。 【emmyer】'); |
@@ -1,82 +0,20 @@ | ||
var mongoose =require('mongoose'); | ||
var Schema = mongoose.Schema; | ||
var conn = mongoose.connect('mongodb://127.0.0.1/tinygame'); | ||
var spawn = require('child_process').spawn; | ||
var tui_site_schema = new Schema({ | ||
id : {type: Number} | ||
, title : {type:String} | ||
, image : {type:String} | ||
, url : {type:String} | ||
}); | ||
command = 'mplayer'; | ||
options = 'http://44.ierge.cn/11/166/332242.mp3'; | ||
var mm_schema = new Schema({ | ||
id : {type:Number} | ||
, title : {type:String} | ||
, image : {type:String} | ||
, url : {type:String} | ||
}); | ||
call_command = spawn(command, [options]); | ||
var tui_site_collections = mongoose.model('tui_site', tui_site_schema); | ||
var mm_collections = mongoose.model("mm", mm_schema); | ||
//call_command.stdout.on('data', function (data) { | ||
//console.log('standard output:\n' + data); | ||
//}); | ||
mm_collections.count({}, function (err, count) { | ||
console.log(count); | ||
call_command.stderr.on('data', function (data) { | ||
console.log('standard error output:\n' + data); | ||
}); | ||
/*var tui_site_length; | ||
function count_tui_site(){ | ||
tui_site_collections.find({"id":{"$gte":0}}, function (err, docs) { | ||
tui_site_length = docs.length; | ||
}) | ||
setTimeout(function () { count_tui_site();}, 60*1000); | ||
} | ||
count_tui_site(); | ||
router.post('/game/tsl.html', function(req, res){ | ||
res.send(tui_site_length.toString()); | ||
call_command.on('exit', function (code, signal) { | ||
console.log('child process eixt ,exit:' + code); | ||
}); | ||
router.post('/game/tsinfo.html', function(req, res){ | ||
tui_site_collections.findOne({"id":(parseInt(req.body.id) % tui_site_length)},function(err,doc){ | ||
if (err) { | ||
console.log(err); | ||
} else { | ||
res.send(doc); | ||
} | ||
}); | ||
});*/ | ||
//router.post('*/tsa.html', function(req, res){ | ||
/* mm_collections.find({"id":{"$gte":0}}, function (err, docs) { | ||
res.send(docs); | ||
}); | ||
}); | ||
*/ | ||
/*for (var i = 0; i < tuiSiteList.length; i++) { | ||
var tui_site_doc = new tui_site_collections(); | ||
tui_site_doc.id = i; | ||
tui_site_doc.title = tuiSiteList[i].t; | ||
tui_site_doc.image = tuiSiteList[i].i; | ||
tui_site_doc.url = tuiSiteList[i].u; | ||
tui_site_doc.save(); | ||
}*/ | ||
/*for (var i = 0; i < ttData.length; i++) { | ||
var mm_doc = new mm_collections(); | ||
mm_doc.id = i; | ||
mm_doc.image = ttData[i].img; | ||
mm_doc.url = ttData[i].a; | ||
mm_doc.save(); | ||
}*/ | ||
/*tui_site_collections.update({"id":0}, { $set: { title: 'xxxxb' }},{},function(err,docs){ | ||
console.log(docs+","+err); | ||
}); */ | ||
/*tui_site_collections.remove({"id":0},function(err,docs){ | ||
console.log(docs); | ||
});*/ | ||
//module.exports = router; | ||
console.log(options); |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Shell access
Supply chain riskThis module accesses the system shell. Accessing the system shell increases the risk of executing arbitrary code.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
44
190679
2399