# microservice-info

> Returns info relevant to use a service in armand1m/microservices project.

Latest version **1.1.2** (published 2017-03-27) · MIT license · 0 weekly downloads

## Install

```sh
npm install microservice-info
pnpm add microservice-info
yarn add microservice-info
bun add microservice-info
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.1.2 |
| Published | 2017-03-27 |
| First published | 2017-03-19 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=4 |
| Dependencies | 1 |
| Known vulnerabilities | 0 (+1 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Armando Magalhães |
| Maintainers | armand1m |

## Links

- npm: https://www.npmjs.com/package/microservice-info
- Repository: https://github.com/armand1m/node-microservice-info
- Homepage: https://github.com/armand1m/node-microservice-info#readme
- Issues: https://github.com/armand1m/node-microservice-info/issues
- npm.io page: https://npm.io/package/microservice-info

## Dependencies (1)

- [ip](https://npm.io/package/ip.md) ^1.1.5

## Recent versions

- 1.1.2 (latest) — 2017-03-27
- 0.0.0-development — 2017-03-27
- 1.0.2 — 2017-03-19
- 1.0.1 — 2017-03-19
- 1.0.0 — 2017-03-19

## README

# microservice-info [![Build Status](https://travis-ci.org/armand1m/microservice-info.svg?branch=master)](https://travis-ci.org/armand1m/microservice-info) [![Coverage Status](https://coveralls.io/repos/github/armand1m/microservice-info/badge.svg?branch=master)](https://coveralls.io/github/armand1m/microservice-info?branch=master)

> This module returns the necessary info from the server to connect a Node.js microservice into the armand1m/microservices environment.

## Install

```
$ npm install --save microservice-info
```


## Usage

```js
const Info = require('microservice-info');

Info.host();
//returns host name=> 'server-name'

Info.ip();
// returns host ip => '127.0.0.1'

Info.consul();
// returns consul configuration and description for clients to connect:

/*

{
	configuration: {
		host: process.env.CONSUL_HOST,
		port: process.env.CONSUL_PORT,
		promisify: true
	},
	description: {
		name: `${Info.name}:${Info.host}`,
		address: Info.host,
		port: Info.port,
		tags: Info.tags,
		check: Info.check
	}
};

*/
```


## API

### microserviceInfo(input, [options])

#### input

Type: `string`

Lorem ipsum.

#### options

##### foo

Type: `boolean`<br>
Default: `false`

Lorem ipsum.


## License

MIT © [Armando Magalhães](http://armand1m.herokuapp.com)

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