AntSwordProject / ant

实时上线的 XSS 盲打平台
476 stars 195 forks source link

route报错 const fs = require('fs'); #5

Open ghost opened 5 years ago

ghost commented 5 years ago

morgan deprecated default format: use combined format app.js:17:9 /root/ant/web/addons/ant.install/route.js:4 const fs = require('fs'); ^^^^^ SyntaxError: Use of const in strict mode. at exports.runInThisContext (vm.js:73:16) at Module._compile (module.js:443:25) at Object.Module._extensions..js (module.js:478:10) at Module.load (module.js:355:32) at Function.Module._load (module.js:310:12) at Module.require (module.js:365:17) at require (module.js:384:17) at /root/ant/web/modules/route.js:66:9 at Array.forEach (native) at module.exports (/root/ant/web/modules/route.js:65:20) 环境是Nodejs 0.12.9 Mongodb 2.6.7

Medicean commented 5 years ago

https://stackoverflow.com/questions/36397812/morgan-deprecated-expressjs/36398066

试试改这里:

https://github.com/AntSwordProject/ant/blob/master/web/app.js#L17