feat(prod): deploy web dashboard, migrate mongodb configuration, resolve server components render error and fix logo static asset paths
This commit is contained in:
1 parent
4882108068
commit
b2ea883601
119 files changed
+7123
-2011
No files matched your search
@@ -0,0 +1,30 @@
|
||||
// test/check_local_db.js
|
||||
const { MongoClient } = require('mongodb');
|
||||
|
||||
const LOCAL_URI = 'mongodb://127.0.0.1:27017';
|
||||
const DB_NAME = 'backone_dpi';
|
||||
|
||||
async function main() {
|
||||
const client = new MongoClient(LOCAL_URI, { serverSelectionTimeoutMS: 2000 });
|
||||
try {
|
||||
await client.connect();
|
||||
console.log("✓ Connected to local MongoDB successfully!");
|
||||
const db = client.db(DB_NAME);
|
||||
const collections = await db.listCollections().toArray();
|
||||
console.log("Collections in local database:", collections.map(c => c.name));
|
||||
|
||||
if (collections.some(c => c.name === 'users')) {
|
||||
const users = await db.collection('users').find({}).toArray();
|
||||
console.log(`Users in local database (${users.length}):`);
|
||||
users.forEach(u => console.log(`- Username: ${u.username}, Role: ${u.role}, Email: ${u.email || 'N/A'}`));
|
||||
} else {
|
||||
console.log("No 'users' collection locally.");
|
||||
}
|
||||
} catch (err) {
|
||||
console.error("✗ Local MongoDB connection failed:", err.message);
|
||||
} finally {
|
||||
await client.close();
|
||||
}
|
||||
}
|
||||
|
||||
main();
|
||||
Reference in new issue
Block a user