@myko.pk/config
v1.0.2
Published
Shared configuration constants for MYKOPK packages
Readme
📑 Table of Contents
- Description
- Key Features
- Use Cases
- Tech Stack
- Quick Start
- Available Scripts
- Project Structure
- Contributors
- Contributing
- License
📝 Description
@myko.pk/config provides shared configuration constants used across every MYKO backend service. Instead of hard-coding database pool sizes, timeouts, or magic numbers in each service, this package centralises them into well-named, well-documented exports. It includes the dynamicPoolDefaultConfig for PostgreSQL connection pooling and the NUMERIX set of standardised numeric constants (timeouts, limits, defaults) that keep every service aligned.
✨ Key Features
- 🔢 Centralised Numeric Constants —
NUMERIX.THIRTY_THOUSAND,NUMERIX.TEN, and more — consistent across all services. - 🗄️ Database Pool Defaults —
dynamicPoolDefaultConfigwith sensible min/max/acquire/idle values for PostgreSQL. - 📘 Fully Typed — Every constant is exported with its TypeScript type.
- ⚡ Zero Dependencies — Pure constants with no runtime deps.
🎯 Use Cases
- Sharing
dynamicPoolDefaultConfigacross all services that connect to PostgreSQL so everypg.Pooluses the same defaults. - Replacing magic numbers like
30000withNUMERIX.THIRTY_THOUSANDfor self-documenting, consistent code. - Importing standardised timeout, retry, and pagination limits in every MYKO package.
🛠️ Tech Stack
- 📘 TypeScript
Notable libraries: None — pure constants, zero runtime deps.
⚡ Quick Start
npm install @myko.pk/configimport { dynamicPoolDefaultConfig } from '@myko.pk/config';
import { NUMERIX } from '@myko.pk/config/db';
const pool = new Pool(dynamicPoolDefaultConfig);
const timeout = NUMERIX.THIRTY_THOUSAND; // 30000🚀 Available Scripts
- build —
npm run build - typecheck —
npm run typecheck
📁 Project Structure
.
├── CHANGELOG.md
├── CONTRIBUTING.md
├── LICENSE
├── SECURITY.md
├── package.json
├── src
│ ├── db
│ │ ├── index.ts
│ │ └── numerix.config.ts
│ └── index.ts
├── tsconfig.json
└── tsup.config.mjs🛠️ Development Setup
- Install Node.js (v18+ recommended)
- Install dependencies:
npm install - Build:
npm run build
🧪 Testing
This project currently exports pure constants — no runtime tests required.
👥 Contributors
See the full list of contributors →
👥 Contributing
Contributions are welcome! Here's the standard flow:
- Fork the repository
- Clone your fork:
git clone https://github.com/mykopk/config.git - Branch:
git checkout -b feature/your-feature - Commit:
git commit -m 'feat: add some feature' - Push:
git push origin feature/your-feature - Open a pull request
Please follow the existing code style and include types for new behavior where applicable.
📜 License
This project is licensed under the MIT License.
Company
MYKO Pakistan
Detail Information Website myko.pk Email [email protected] About Building digital infrastructure and super-app experiences for millions of users across Pakistan. Built with ❤️ in Pakistan 🇵🇰
