central-error-codes
TypeScript icon, indicating that this package has built-in type declarations

0.0.7 • Public • Published
# Centralized Error Codes

## Overview
This repository provides a centralized collection of error codes that can be used across multiple microservices. It is designed to standardize error handling for both Node.js and Python-based applications.

## Publishing a New Node Module
Follow these steps to publish a new version of the module:

1. Install dependencies:
   ```sh
   npm i --save-dev @types/node
  1. Build the project:
    npm run build
  2. Package the module:
    npm pack
  3. Publish the package to npm (ensure you are logged in):
    npm publish --access public
    If not logged in, run:
    npm login

Installation

To use this package in a Node.js application, install it via npm:

npm install central-error-codes

Usage in Node.js

Import and use the error codes in your application:

import { ErrorCode } from "central-error-codes";

const ALL_ERROR_CODE = ErrorCode.getAllErrors();
const CMS_ERROR_CODE = ErrorCode.getCMSGatewayError();

Usage in Python

For Python-based applications, usage instructions will be provided in a future update.

Publishing a New Version for Python

To publish a new version of this package to PyPI, follow these steps:

  1. Install the required tools:
    pip install setuptools wheel twine
  2. Build the distribution files:
    python3 setup.py sdist bdist_wheel
    or alternatively:
    python3 -m build
  3. Upload the package to PyPI using Twine:
    twine upload $(find dist -type f -not -path "dist/typescript/*")

Package Sidebar

Install

npm i central-error-codes

Weekly Downloads

49

Version

0.0.7

License

MIT

Unpacked Size

8.51 kB

Total Files

5

Last publish

Collaborators

  • imshe
  • vsowmya