Add landing page
This commit is contained in:
parent
3fea484585
commit
bce86ee840
47 changed files with 7119 additions and 439 deletions
27
scripts/check-series.js
Normal file
27
scripts/check-series.js
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
import mongoose from 'mongoose';
|
||||
import Series from '../server/models/series.js';
|
||||
|
||||
const MONGODB_URI = process.env.MONGODB_URI || 'mongodb://localhost:27017/ghostguild';
|
||||
|
||||
async function checkSeries() {
|
||||
try {
|
||||
await mongoose.connect(MONGODB_URI);
|
||||
console.log('Connected to MongoDB');
|
||||
|
||||
const allSeries = await Series.find({}).lean();
|
||||
console.log(`\nTotal series: ${allSeries.length}\n`);
|
||||
allSeries.forEach(s => {
|
||||
console.log(`ID: ${s.id}`);
|
||||
console.log(`Title: ${s.title}`);
|
||||
console.log(`_id: ${s._id}`);
|
||||
console.log('---');
|
||||
});
|
||||
|
||||
} catch (error) {
|
||||
console.error('Error:', error);
|
||||
} finally {
|
||||
await mongoose.connection.close();
|
||||
}
|
||||
}
|
||||
|
||||
checkSeries();
|
||||
Loading…
Add table
Add a link
Reference in a new issue