UNPKG

@masuidrive/ticket

Version:

Real-time ticket tracking viewer with Vite + Express

56 lines (43 loc) 1.19 kB
# Ticket Viewer Server Express server that serves current-ticket.md content with real-time updates. ## Features - Reads and serves current-ticket.md file - Real-time file watching with WebSocket updates - YAML frontmatter parsing - Runs on port 4932 - PM2 support for development ## Development ### Start with PM2 ```bash pnpm run pm2:start ``` ### Other PM2 commands ```bash pnpm run pm2:status # Check server status pnpm run pm2:logs # View server logs pnpm run pm2:restart # Restart server pnpm run pm2:stop # Stop server pnpm run pm2:delete # Remove from PM2 ``` ### Start without PM2 ```bash pnpm run server:dev ``` ### Build for production ```bash pnpm run server:build pnpm run server:start ``` ## API Endpoints - `GET /health` - Health check - `GET /api/ticket` - Get current ticket content - `GET /api/ticket/exists` - Check if ticket file exists - WebSocket at `ws://localhost:4932` - Real-time updates ## CLI Usage ```bash npx @masuidrive/ticket [options] Options: -p, --port <number> Port to run the server on (default: 4932) -d, --dir <path> Project directory containing current-ticket.md -h, --help Show help message ```