This commit is contained in:
2026-04-07 14:50:23 +09:00
commit b4e485502b
4778 changed files with 2017091 additions and 0 deletions

View File

@@ -0,0 +1,56 @@
var express = require('express');
var router = express.Router();
var util = require('util');
var mysql = require('mysql');
var moment = require('moment');
var fs = require('fs');
var utils = require('../../../src/utils');
var crossCtl = require('../../../src/crossCtl');
var path = require('path');
var passport = require('passport');
// operation
/*
router.use(function (req, res, next) {
next()
})
*/
/*
router.use(function (req, res, next) {
if (req.infos.userInfo.adminFlag === false) {
res
.status(401)
.render("main/pages/error", {
infos: req.infos,
errorCode: 401,
errorMessage: "Unauthorized",
});
} else {
next();
}
});
*/
router.get('/heapdump', function (req, res) {
utils.doHeapdump(
crossCtl.sConfig.debug,
'heapsnapshot_of_' +
crossCtl.sConfig.sid +
'_' +
utils.getNow().replace(' ', '_') +
'.heapsnapshot',
function (error, resultPath) {
console.log('heapsnapshot saved...');
res.send(
JSON.stringify({ whoami: 'pond-one', message: 'heapdumped...' })
);
}
);
});
module.exports = router;