# @dracul/common-backend

> Common utils

Latest version **1.46.0** (published 2026-05-08) · ISC license · 0 weekly downloads

## Install

```sh
npm install @dracul/common-backend
pnpm add @dracul/common-backend
yarn add @dracul/common-backend
bun add @dracul/common-backend
```

## Health

**Score 45/100 (D)** — status: stable.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

## Facts

| | |
|---|---|
| Version | 1.46.0 |
| Published | 2026-05-08 |
| First published | 2020-10-08 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 52.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 3 |
| Author | Cristian Incarnato & Dracul Team |
| Maintainers | cincarnato |
| Keywords | common, api, backend |

## Links

- npm: https://www.npmjs.com/package/@dracul/common-backend
- Repository: https://github.com/cincarnato/ci-common-module
- Homepage: https://github.com/cincarnato/ci-common-module#readme
- Issues: https://github.com/cincarnato/ci-common-module/issues
- npm.io page: https://npm.io/package/@dracul/common-backend

## Alternatives

- [@mdxeditor/editor](https://npm.io/package/@mdxeditor/editor.md) — 962.4K weekly downloads
- [mmdb-lib](https://npm.io/package/mmdb-lib.md) — 680.9K weekly downloads
- [playcanvas](https://npm.io/package/playcanvas.md) — 36.2K weekly downloads
- [@glw907/cairn-cms](https://npm.io/package/@glw907/cairn-cms.md) — 967 weekly downloads
- [markdown-to-confluence](https://npm.io/package/markdown-to-confluence.md) — 103 weekly downloads

## Recent versions

- 1.46.0 (latest) — 2026-05-08
- 1.44.0 — 2026-02-05
- 1.43.3 — 2026-02-05
- 1.40.0 — 2025-08-28
- 1.39.0 — 2025-07-14
- 1.37.5 — 2025-07-02
- 1.34.0 — 2024-05-23
- 1.31.0 — 2024-05-20
- 2.1.0 — 2024-05-20
- 1.30.0 — 2024-05-20
- 1.29.2 — 2024-05-20
- 1.28.8 — 2024-05-17
- 1.28.7 — 2024-05-17
- 1.28.1 — 2024-05-17
- 1.28.0 — 2024-05-17
- … 32 more at https://npm.io/package/@dracul/common-backend/versions

## README

# ci common module
Common utils

## Helpers
- create dir if not exist
- random number
- random string
- store file

## Logger

### setup a winston default logger
A kind of factory for winston default logger that use environment variables for flexible configuration

#### Environment variables:
```$xslt
#LOG LEVEL OPTIONS: error, warning, info, debug
LOG_LEVEL=debug

#Enable Log File: ON / OFF
LOG_FILE=ON

#Enable colorize console logs: ON / OFF
LOG_COLORIZE=ON

# Max log file size in bytes. Ex: 10000000 Bytes == 1 MegaByte
LOG_FILE_MAX_SIZE=10000000

# Number of max files
LOG_FILE_MAX_FILES=3

# Enable JSON format: ON / OFF
LOG_JSON=OFF
```

---
_Source: https://npm.io/package/@dracul/common-backend · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
