/**
 * Uninstall TestDataDB Windows Service
 *
 * Run: node uninstall-service.js
 */

const path = require('path');
const Service = require('node-windows').Service;

const svc = new Service({
    name: 'TestDataDB',
    script: path.join(__dirname, 'server.js')
});

svc.on('uninstall', () => {
    console.log('[OK] TestDataDB service uninstalled successfully.');
});

svc.on('error', (err) => {
    console.error('[ERROR] Service uninstall failed:', err);
});

console.log('[INFO] Uninstalling TestDataDB Windows service...');
svc.uninstall();
