style(sidebar): match active item highlight and header buttons 100% with demoplace.my.id
This commit is contained in:
1 parent
7f133a287b
commit
960322e30a
49 files changed
+3226
-1503
No files matched your search
@@ -0,0 +1,28 @@
|
||||
|
||||
if (typeof globalThis.crypto === 'undefined') {
|
||||
globalThis.crypto = require('crypto');
|
||||
}
|
||||
const mongoose = require('mongoose');
|
||||
const path = require('path');
|
||||
require('dotenv').config({ path: path.join(__dirname, '..', '.env.production') });
|
||||
|
||||
const MONGODB_URI = process.env.MONGODB_URI;
|
||||
const { collectAllAgents } = require('../proxy/collector');
|
||||
|
||||
async function run() {
|
||||
console.log('[Trigger] Connecting to MongoDB...');
|
||||
await mongoose.connect(MONGODB_URI);
|
||||
console.log('[Trigger] Connected. Starting collection cycle...');
|
||||
try {
|
||||
const res = await collectAllAgents();
|
||||
console.log('[Trigger] Collection cycle finished successfully:', res);
|
||||
} catch (err) {
|
||||
console.error('[Trigger] Collection cycle failed:', err);
|
||||
} finally {
|
||||
await mongoose.connection.close();
|
||||
console.log('[Trigger] MongoDB connection closed.');
|
||||
}
|
||||
}
|
||||
|
||||
run();
|
||||
|
||||
Reference in new issue
Block a user