Some checks failed
SourceFinder CI/CD Pipeline / Code Quality & Linting (push) Has been cancelled
SourceFinder CI/CD Pipeline / Unit Tests (push) Has been cancelled
SourceFinder CI/CD Pipeline / Security Tests (push) Has been cancelled
SourceFinder CI/CD Pipeline / Integration Tests (push) Has been cancelled
SourceFinder CI/CD Pipeline / Performance Tests (push) Has been cancelled
SourceFinder CI/CD Pipeline / Code Coverage Report (push) Has been cancelled
SourceFinder CI/CD Pipeline / Build & Deployment Validation (16.x) (push) Has been cancelled
SourceFinder CI/CD Pipeline / Build & Deployment Validation (18.x) (push) Has been cancelled
SourceFinder CI/CD Pipeline / Build & Deployment Validation (20.x) (push) Has been cancelled
SourceFinder CI/CD Pipeline / Regression Tests (push) Has been cancelled
SourceFinder CI/CD Pipeline / Security Audit (push) Has been cancelled
SourceFinder CI/CD Pipeline / Notify Results (push) Has been cancelled
- Architecture modulaire avec injection de dépendances - Système de scoring intelligent multi-facteurs (spécificité, fraîcheur, qualité, réutilisation) - Moteur anti-injection 4 couches (preprocessing, patterns, sémantique, pénalités) - API REST complète avec validation et rate limiting - Repository JSON avec index mémoire et backup automatique - Provider LLM modulaire pour génération de contenu - Suite de tests complète (Jest) : * Tests unitaires pour sécurité et scoring * Tests d'intégration API end-to-end * Tests de sécurité avec simulation d'attaques * Tests de performance et charge - Pipeline CI/CD avec GitHub Actions - Logging structuré et monitoring - Configuration ESLint et environnement de test 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
44 lines
1.1 KiB
JavaScript
44 lines
1.1 KiB
JavaScript
/**
|
|
* Script de test rapide du serveur
|
|
*/
|
|
require('dotenv').config();
|
|
|
|
const SourceFinderApp = require('./src/app');
|
|
|
|
async function testServer() {
|
|
console.log('🧪 Testing SourceFinder server...');
|
|
|
|
try {
|
|
const sourceFinderApp = new SourceFinderApp();
|
|
const app = await sourceFinderApp.initialize();
|
|
|
|
const server = app.listen(3000, async () => {
|
|
console.log('✅ Server started on port 3000');
|
|
|
|
// Test health endpoint
|
|
try {
|
|
const response = await fetch('http://localhost:3000/health');
|
|
const data = await response.json();
|
|
console.log('✅ Health check:', data);
|
|
|
|
// Test API endpoint
|
|
const apiResponse = await fetch('http://localhost:3000/api/v1/news/search');
|
|
const apiData = await apiResponse.json();
|
|
console.log('✅ API endpoint:', apiData);
|
|
|
|
console.log('🎉 All tests passed!');
|
|
|
|
} catch (error) {
|
|
console.error('❌ Test failed:', error.message);
|
|
}
|
|
|
|
server.close();
|
|
await sourceFinderApp.shutdown();
|
|
});
|
|
|
|
} catch (error) {
|
|
console.error('❌ Server test failed:', error);
|
|
}
|
|
}
|
|
|
|
testServer(); |