mirror of
https://github.com/alibaba/anyproxy.git
synced 2025-08-04 21:39:04 +00:00
optimize recorder
This commit is contained in:
@@ -37,15 +37,15 @@ function webInterface(config){
|
||||
return next();
|
||||
});
|
||||
|
||||
// app.get("/summary",function(req,res){
|
||||
// recorder.getSummaryList(function(err,docs){
|
||||
// if(err){
|
||||
// res.end(err.toString());
|
||||
// }else{
|
||||
// res.json(docs.slice(docs.length -500));
|
||||
// }
|
||||
// });
|
||||
// });
|
||||
app.get("/lastestLog",function(req,res){
|
||||
recorder.getRecords(null,60,function(err,docs){
|
||||
if(err){
|
||||
res.end(err.toString());
|
||||
}else{
|
||||
res.json(docs);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
app.get("/fetchCrtFile",function(req,res){
|
||||
if(crtFilePath){
|
||||
@@ -108,6 +108,7 @@ function webInterface(config){
|
||||
|
||||
app.use(express.static(staticDir));
|
||||
|
||||
//plugin from rule file
|
||||
if(typeof userRule._plugIntoWebinterface == "function"){
|
||||
userRule._plugIntoWebinterface(app,function(){
|
||||
app.listen(port);
|
||||
|
||||
Reference in New Issue
Block a user