Skip to main content
Glama
rizaqpratama

CucumberStudio MCP Server

by rizaqpratama
index.js1.43 kB
const express = require('express'); const cors = require('cors'); const morgan = require('morgan'); const { logger } = require('./utils/logger'); const routes = require('./routes'); const { notFound, errorHandler } = require('./middlewares/errorHandler'); const config = require('./config'); // Create Express app const app = express(); const port = config.port; // Middleware app.use(cors({ origin: config.cors.origin })); app.use(express.json()); app.use(express.urlencoded({ extended: true })); app.use(morgan(config.env === 'development' ? 'dev' : 'combined')); // Routes app.use('/api', routes); // Health check endpoint app.get('/health', (req, res) => { res.status(200).json({ status: 'ok', environment: config.env, timestamp: new Date().toISOString() }); }); // Error handling middleware app.use(notFound); app.use(errorHandler); // Start server app.listen(port, () => { logger.info(`Server running on port ${port}`); logger.info(`Environment: ${config.env}`); }); // Handle unhandled promise rejections process.on('unhandledRejection', (reason, promise) => { logger.error('Unhandled Rejection at:', promise, 'reason:', reason); }); // Handle uncaught exceptions process.on('uncaughtException', (err) => { logger.error('Uncaught Exception:', err); // Give the logger time to log the error before exiting setTimeout(() => { process.exit(1); }, 1000); }); module.exports = app;

Latest Blog Posts

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/rizaqpratama/mcp-cucumberstudio'

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