Constants you can count on.
Shared configuration constants for the MYKO ecosystem — database pool defaults, well-known numeric constants, and cross-service configuration values.
- Description
- Key Features
- Use Cases
- Tech Stack
- Quick Start
- Available Scripts
- Project Structure
- Contributors
- Contributing
- License
@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.
- 🔢 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.
- 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.
- 📘 TypeScript
Notable libraries: None — pure constants, zero runtime deps.
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- build —
npm run build - typecheck —
npm run typecheck
.
├── CHANGELOG.md
├── CONTRIBUTING.md
├── LICENSE
├── SECURITY.md
├── package.json
├── src
│ ├── db
│ │ ├── index.ts
│ │ └── numerix.config.ts
│ └── index.ts
├── tsconfig.json
└── tsup.config.mjs
- Install Node.js (v18+ recommended)
- Install dependencies:
npm install - Build:
npm run build
This project currently exports pure constants — no runtime tests required.
See the full list of contributors →
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.
This project is licensed under the MIT License.
MYKO Pakistan
Detail Information Website myko.pk Email support@myko.pk About Building digital infrastructure and super-app experiences for millions of users across Pakistan. Built with ❤️ in Pakistan 🇵🇰