Files
dwroller/database/legacy/install-mongodb.js
Alex dde3abda55 feat: Add validation and normalization utilities for player records
- Implemented `validatePlayer` and `normalizeTabInfo` functions in `database/validate.js` for player data validation and normalization.
- Added error handling for required fields and enforced data types and constraints.
- Introduced standardization for characteristics and skills.

feat: Create script for extracting rules from PDF files

- Developed `extract-rules.js` to extract text from PDF rulebooks and categorize rules.
- Integrated `pdftotext` for PDF processing and created a searchable rules database.
- Implemented rule categorization and indexing for efficient searching.

feat: Implement RulesTab component for rule searching

- Created `RulesTab.jsx` for searching and displaying rules with filtering options.
- Added recent searches and quick reference buttons for user convenience.
- Integrated API calls for fetching rules and displaying results dynamically.

feat: Add test script for Rules API

- Created `test-rules.js` to test the functionality of the Rules API endpoints.
- Included tests for search and stats endpoints to ensure proper response handling.
2025-08-16 12:15:32 +02:00

27 lines
1.1 KiB
JavaScript

const { execSync } = require('child_process');
function installMongoDB() {
try {
console.log('Installing gnupg and curl...');
execSync('sudo apt-get install -y gnupg curl', { stdio: 'inherit' });
console.log('Importing MongoDB public GPG key...');
execSync('curl -fsSL https://www.mongodb.org/static/pgp/server-8.0.asc | sudo gpg -o /usr/share/keyrings/mongodb-server-8.0.gpg --dearmor', { stdio: 'inherit' });
console.log('Creating MongoDB list file...');
execSync('echo "deb [ arch=amd64,arm64 signed-by=/usr/share/keyrings/mongodb-server-8.0.gpg ] https://repo.mongodb.org/apt/ubuntu noble/mongodb-org/8.0 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-8.0.list', { stdio: 'inherit' });
console.log('Reloading package database...');
execSync('sudo apt-get update', { stdio: 'inherit' });
console.log('Installing MongoDB Community Server...');
execSync('sudo apt-get install -y mongodb-org', { stdio: 'inherit' });
console.log('MongoDB installation completed successfully.');
} catch (error) {
console.error('Error during MongoDB installation:', error.message);
}
}
installMongoDB();