UNPKG

lyric-karaoke-cli

Version:

A CLI application for displaying song lyrics in a karaoke-style format

40 lines (31 loc) 942 B
#!/usr/bin/env node /** * Main entry point for the Lyric Karaoke CLI application */ require('dotenv').config(); const api = require('./src/api'); const cli = require('./src/cli'); const cache = require('./src/cache'); const config = require('./src/config'); const { logger } = require('./src/utils'); // Initialize the application async function init() { try { logger.info('Starting Lyric Karaoke CLI application...'); // Check if API key is configured const apiKey = config.getApiKey(); if (!apiKey) { logger.error('API key not found. Please configure it in your .env file.'); process.exit(1); } // Initialize cache await cache.init(); // Start the CLI interface await cli.start(); } catch (error) { logger.error('Failed to initialize application:', error.message); process.exit(1); } } // Run the application init();