Skip to main content
Glama

Superjolt MCP Server

by scoritz
dev-watch.js•2.42 kB
#!/usr/bin/env node const { spawn } = require('child_process'); const { watch } = require('fs'); const path = require('path'); console.log('šŸš€ Starting Superjolt development mode...\n'); // Run initial build console.log('šŸ“¦ Building project...'); const initialBuild = spawn('npm', ['run', 'build'], { stdio: 'inherit' }); initialBuild.on('close', (code) => { if (code !== 0) { console.error('āŒ Initial build failed'); process.exit(code); } console.log('šŸ”— Installing globally...'); const install = spawn('npm', ['install', '-g', '.'], { stdio: 'inherit' }); install.on('close', () => { console.log('āœ… Initial setup complete!\n'); startWatching(); }); }); function startWatching() { console.log('šŸ‘€ Starting watch mode with auto-install...\n'); // Start nest build --watch const nestWatch = spawn('npx', ['nest', 'build', '--watch'], { stdio: 'inherit' }); // Watch the dist directory for changes const distDir = path.join(__dirname, '..', 'dist'); let installTimeout; let isInstalling = false; const watcher = watch(distDir, { recursive: true }, (eventType, filename) => { // Skip if we're already installing or if it's not a .js file if (isInstalling || !filename || !filename.endsWith('.js')) return; // Skip map files and test files if (filename.endsWith('.map') || filename.includes('.spec.')) return; // Clear any pending install clearTimeout(installTimeout); // Wait 500ms after last change before installing (debounce) installTimeout = setTimeout(() => { isInstalling = true; console.log('\nšŸ”„ Changes detected, updating global command...'); const install = spawn('npm', ['install', '-g', '.'], { stdio: ['inherit', 'pipe', 'pipe'] }); install.on('close', (code) => { if (code === 0) { console.log('āœ… Global command updated successfully!\n'); } else { console.error('āŒ Failed to update global command\n'); } isInstalling = false; }); }, 500); }); // Handle Ctrl+C process.on('SIGINT', () => { console.log('\n\nšŸ›‘ Stopping watch mode...'); nestWatch.kill(); watcher.close(); process.exit(0); }); nestWatch.on('close', (code) => { console.log('Watch process exited with code', code); watcher.close(); process.exit(code); }); }

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/scoritz/superjolt'

If you have feedback or need assistance with the MCP directory API, please join our Discord server