Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@everymundo/generate-microservice-name

Package Overview
Dependencies
Maintainers
26
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@everymundo/generate-microservice-name

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

  • 1.1.2
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
26
Created
Source

@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

  "name": "my-app",
  "version": "1.2.3",

your-app.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

  "name": "@my-company/my-app-name",
  "version": "2.3.0",

your-app.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

  "name": "@my-company/my-app-name",
  "version": "2.3.0",
  "config": {
    "customMicroserviceName": "some-other-name-v2",
  }

your-app.js

const { getMicroserviceName } = require('@everymundo/generate-microservice-name');

const myAppName = getMicroserviceName();

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

FAQs

Package last updated on 28 May 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc