finished gallery section
This commit is contained in:
35
server.js
35
server.js
@@ -55,7 +55,7 @@ function startCppScraper() {
|
||||
|
||||
const env = { ...process.env };
|
||||
env.PATH = `${dllPath};${env.PATH}`;
|
||||
|
||||
|
||||
console.log("⚡ Starting WaifuBoard Scraper Engine (C++)...");
|
||||
|
||||
const scraper = spawn(exePath, [], {
|
||||
@@ -73,39 +73,10 @@ function startCppScraper() {
|
||||
});
|
||||
}
|
||||
|
||||
function startCppScraper() {
|
||||
const exePath = path.join(__dirname, 'src', 'metadata', 'anilist.exe');
|
||||
const dllPath = path.join(__dirname, 'src', 'metadata', 'binaries');
|
||||
|
||||
if (!fs.existsSync(exePath)) {
|
||||
console.error(`❌ C++ Error: Could not find executable at: ${exePath}`);
|
||||
console.error(" Did you compile it? (g++ src/metadata/anilist.cpp -o src/metadata/anilist.exe ...)");
|
||||
return;
|
||||
}
|
||||
|
||||
const env = { ...process.env };
|
||||
env.PATH = `${dllPath};${env.PATH}`;
|
||||
|
||||
console.log("⚡ Starting WaifuBoard Scraper Engine (C++)...");
|
||||
|
||||
const scraper = spawn(exePath, [], {
|
||||
stdio: 'inherit',
|
||||
cwd: __dirname,
|
||||
env: env
|
||||
});
|
||||
|
||||
scraper.on('error', (err) => {
|
||||
console.error('❌ Failed to spawn C++ process:', err);
|
||||
});
|
||||
|
||||
scraper.on('close', (code) => {
|
||||
console.log(`✅ Scraper process finished with code ${code}`);
|
||||
});
|
||||
}
|
||||
|
||||
const start = async () => {
|
||||
try {
|
||||
initDatabase();
|
||||
initDatabase("anilist");
|
||||
initDatabase("favorites");
|
||||
await loadExtensions();
|
||||
|
||||
await fastify.listen({ port: 3000, host: '0.0.0.0' });
|
||||
|
||||
Reference in New Issue
Block a user