# @everymundo/generate-microservice-name

> It generates the microservice name by reading the data from the projects package.json

Latest version **1.1.2** (published 2019-05-28) · MIT license · 0 weekly downloads

## Install

```sh
npm install @everymundo/generate-microservice-name
pnpm add @everymundo/generate-microservice-name
yarn add @everymundo/generate-microservice-name
bun add @everymundo/generate-microservice-name
```

## Health

**Score 25/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

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

Negative: abandoned.

## Facts

| | |
|---|---|
| Version | 1.1.2 |
| Published | 2019-05-28 |
| First published | 2018-03-15 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 12.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Daniel Santana |
| Maintainers | alexandprivate, anahiem, avivero93, ballester, caviola, christopherepm, danielsan, davidxl, devrchancay, eduardomundo, emdavidmoreno, erlin, ernestocarrasco, everymundo-admin, front10devs, gallegogt, hdelcastillo, herlin, hugopalomares, jonmorazav, joseivansandoya, karinfdez, mvcruzata, neilgoldman, raymer, yartiles |

## Links

- npm: https://www.npmjs.com/package/@everymundo/generate-microservice-name
- Repository: https://github.com/EveryMundo/generate-microservice-name
- Homepage: https://github.com/EveryMundo/generate-microservice-name#readme
- Issues: https://github.com/EveryMundo/generate-microservice-name/issues
- npm.io page: https://npm.io/package/@everymundo/generate-microservice-name

## Dependencies (1)

- [@everymundo/global-root-dir](https://npm.io/package/@everymundo/global-root-dir.md) ^1.1.1

## Recent versions

- 1.1.2 (latest) — 2019-05-28
- 1.1.1 — 2018-03-21
- 1.1.0 — 2018-03-21
- 1.0.1 — 2018-03-15
- 1.0.0 — 2018-03-15

## README

# @everymundo/generate-microservice-name
It generates the microservice name by reading the data from the projects package.json

# Install
npm install @everymundo/generate-microservice-name

# Usage

The function ```getMicroserviceName``` will use your apps *package.json* file in order to
either generate a valid microservice name under the Everymundo Naming Convention or retrieve
the name contained in the ```config.customMicroserviceName```

### Common scenario
*package.json*
```json
  "name": "my-app",
  "version": "1.2.3",
```
*your-app.js*
```js
const { getMicroserviceName } = require('@everymundo/generate-microservice-name');

const myAppName = getMicroserviceName();

console.log(myAppName); // this will print my-app-v1
```

### Namespaced scenario
In a different scenario, with a namespace for example

*package.json*
```json
  "name": "@my-company/my-app-name",
  "version": "2.3.0",
```
*your-app.js*
```js
const { getMicroserviceName } = require('@everymundo/generate-microservice-name');

const myAppName = getMicroserviceName();

console.log(myAppName); // this will print my-app-name-v2
```

### Custom Microservice Name scenario
If, for some special reason, you need a different app name (not common), you can use this mechanism

*package.json*
```json
  "name": "@my-company/my-app-name",
  "version": "2.3.0",
  "config": {
    "customMicroserviceName": "some-other-name-v2",
  }
```
*your-app.js*
```js
const { getMicroserviceName } = require('@everymundo/generate-microservice-name');

const myAppName = getMicroserviceName();

console.log(myAppName); // this will print my-app-name-v2
```

---
_Source: https://npm.io/package/@everymundo/generate-microservice-name · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
