- Add package.json for project configuration and dependencies. - Implement NewsApplication class to manage service lifecycle and HTTP pipeline. - Create CategoryCatalog for managing news categories. - Introduce ServiceConfig for environment variable management. - Load environment variables from .env files. - Develop NewsApiCompatibilityController to mimic NewsAPI endpoints. - Create NewsController for querying and refreshing news data. - Establish AbstractJsonRepository for JSON storage operations. - Implement main entry point in index.js to bootstrap the application. - Create CategoryNewsRepository for category-specific news storage. - Add ConsoleLogger for structured logging. - Implement NewsApiClient for fetching articles from NewsAPI. - Develop NewsRefreshScheduler for scheduling news refresh tasks. - Create NewsStorageService to coordinate news data management.
7 lines
190 B
Plaintext
7 lines
190 B
Plaintext
PORT=3100
|
|
NEWS_API_KEY=03f614876f0645948cb9bbce1661f4b2
|
|
NEWS_API_BASE_URL=https://newsapi.org/v2/everything
|
|
NEWS_API_LANGUAGE=ko
|
|
NEWS_PAGE_SIZE=20
|
|
NEWS_REFRESH_CRON=0 * * * *
|
|
DATA_DIR=./data |