survey-mcp-server
Version:
Survey management server handling survey creation, response collection, analysis, and reporting with database access for data management
25 lines (19 loc) • 585 B
JavaScript
import { spawn } from 'child_process';
import { fileURLToPath } from 'url';
import { dirname, join } from 'path';
const __filename = fileURLToPath(import.meta.url);
const __dirname = dirname(__filename);
const serverPath = join(__dirname, '..', 'dist', 'index.js');
const args = process.argv.slice(2);
const child = spawn('node', [serverPath, ...args], {
stdio: 'inherit',
shell: true
});
child.on('error', (error) => {
console.error('Error starting survey server:', error);
process.exit(1);
});
child.on('exit', (code) => {
process.exit(code);
});