Skip to content

[WIP] Implement Configurable Server Initialization with Environment Variable Support - #19

Draft
HermanL0201 wants to merge 6 commits into
ca474b28-c708-4e52-b0e9-a2a7961b1b10from
feature-server-config-env-support-1749228920
Draft

[WIP] Implement Configurable Server Initialization with Environment Variable Support#19
HermanL0201 wants to merge 6 commits into
ca474b28-c708-4e52-b0e9-a2a7961b1b10from
feature-server-config-env-support-1749228920

Conversation

@HermanL0201

Copy link
Copy Markdown
Owner

Implement Configurable Server Initialization with Environment Variable Support

Description

Task

Implement server initialization with configurable parameters

Acceptance Criteria

  • Server can be configured via environment variables
  • Default configuration is provided if no environment variables are set
  • Configuration supports both development and production environments
  • Configuration is type-safe and prevents invalid inputs

Summary of Work

This pull request introduces a flexible server configuration system that allows dynamic port and host settings through environment variables. The implementation will provide a robust foundation for our CoinGecko Mock API server, enabling easy deployment across different environments.

Changes Made

  • Create src/config/server-config.ts for centralized configuration management
  • Implement environment variable parsing for server host and port
  • Add default fallback values for host and port
  • Create initial server initialization logic in src/server.ts
  • Ensure type safety for configuration parameters

Tests

  • Verify server can be started with default configuration
  • Confirm environment variables override default settings
  • Validate type safety of configuration parameters
  • Test server initialization with various port and host combinations

Signatures

Staking Key

DZwmqbbKALnQYMhTLYdYeBBKVNptDMSAKQjaASJ9btgo: Ss9yGoR17Q7uNv3ooqGStnVrJrPwWGWNFwPVcBUqpxFiShGFBUnCE7dmkxe3SxtZKWUVNJ33vrwGFNqCP7eLD8EnmaL8xo3FUqKGSYubpC6FtmHtQKQ47hr4prtQCmHXGgovSDYdWFytLVYhs3YNxmUfVzyj9qva7x9EJqUWz9doFNKDo7jJ91jex5Axt5kbH4x5EUM5ubKDbSJurEVZ5rKk49agPFHVoVciGpe4Bhh2NjzvW4t3QgJgyrGJKzFZjyCnEMv7oH2YE9tJ8LanoyzGijJdUEekR4DfmJom3ekbS2RxcAnheTEPEB1EEw32iMwsXkufoeuP5Rui6diCnjfhhtHGz1K8WfGq9TWr1ZXqiH9jqpLPDAZGKJ9RXapet8UzSCvPE5gLzyUwj776LnusDAJxFxFGZQp

Public Key

4E3nQUGBiknkTFLJE6Htj3KKNnHzpxhNv2Jw5cvW4s7J: 13F4AFzAZnMniLX32WCtogAMpwmFmGtmhENW1Ywefb4GHPRWS2mwLy9myAQkTQBNgjVakHc3HdeKqiffFyAdAxYS5J99efYAEcaoacuEqoLGwtwbagioSd7k8HpyPUsVqqKySgPNFAuUWB51wjJSU8bNB9mSvMV3DL7yCMcHaXxpG2pk5cdckEEwaTCYFcRdKiRuHAx61o2sXYbmsmmF74qrLzVajimfE3bPBVbJ3GXh3DWGUngYiemUjXSnnc45G3WoDKp2vMvGoor6wE5i8JrfmR6yzcCVMrnMLrsSUr3vgFavxb1LgHGitHASdTu3JP2urkZJYSkF4ibqnMEasLMe8qQAm5h4dK3UF93T3r3FeMfdG6gE4STJPpc8Gq6EfwEsi2WAUi5E4D6ddcm7zLmp4E2svEezB3A

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant