Added support for newer mongoose versions

-Mongoose and mongodb dependencies have been updated to the most recent versions in package.json
-Updated the project for use with the newest mongoose major version which required fixing many breaking changes to a number of files in the explorer
-Removed the db.find_address_tx() function as it is unused

NOTE: This update requires mongoose 6.0.10 or higher. If you are getting errors running the explorer after upgrading, it is recommended to run an 'npm update' or manually update mongoose to a more modern version which should fix the problem
This commit is contained in:
Joe Uhren
2023-05-07 20:55:29 -06:00
parent ace3f52543
commit 1a0ef69749
8 changed files with 854 additions and 649 deletions
+4 -1
View File
@@ -23,9 +23,12 @@ db.connect(dbString, function() {
server.close(() => {
var mongoose = require('mongoose');
mongoose.connection.close(false, () => {
mongoose.connection.close(false).then(() => {
// close the main process now that all http and database connections have closed
process.exit(0);
}).catch((err) => {
console.log(err);
process.exit(1);
});
});
});