# easy-microservices-app

> This is one package that allows to easily deploy one API based on microservices. Born after i mane one API and allows the DEV to easily skip boilerplate code and quickly deploy one API

Latest version **0.1.0** (published 2018-03-17) · MIT license · 0 weekly downloads

> **Deprecated.** This package is deprecated.

## Install

```sh
npm install easy-microservices-app
pnpm add easy-microservices-app
yarn add easy-microservices-app
bun add easy-microservices-app
```

## Health

**Score 10/100 (F)** — status: deprecated.

Negative: deprecated.

## Facts

| | |
|---|---|
| Version | 0.1.0 |
| Published | 2018-03-17 |
| First published | 2018-03-17 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 10 |
| Unpacked size | 5.8 MB |
| Known vulnerabilities | 0 (+7 in 4 direct dependencies) |
| Install scripts | no |
| GitHub stars | 1 |
| Author | Diogo Aleixo |
| Maintainers | diogoaleixo |

## Links

- npm: https://www.npmjs.com/package/easy-microservices-app
- Repository: https://github.com/aleixo/easy-microservices-app
- Homepage: https://github.com/aleixo/easy-microservices-app#readme
- Issues: https://github.com/aleixo/easy-microservices-app/issues
- npm.io page: https://npm.io/package/easy-microservices-app

## Dependencies (10)

- [fs](https://npm.io/package/fs.md) 0.0.1-security
- [pg](https://npm.io/package/pg.md) ^7.4.1
- [jade](https://npm.io/package/jade.md) ~1.11.0
- [debug](https://npm.io/package/debug.md) ~2.6.9
- [morgan](https://npm.io/package/morgan.md) ~1.9.0
- [express](https://npm.io/package/express.md) ~4.15.5
- [bluebird](https://npm.io/package/bluebird.md) ^3.5.1
- [body-parser](https://npm.io/package/body-parser.md) ~1.18.2
- [cookie-parser](https://npm.io/package/cookie-parser.md) ~1.4.3
- [serve-favicon](https://npm.io/package/serve-favicon.md) ~2.4.5

## Recent versions

- 0.1.0 (latest) — 2018-03-17
- 0.0.9 — 2018-03-17
- 0.0.8 — 2018-03-17
- 0.0.7 — 2018-03-17
- 0.0.6 — 2018-03-17
- 0.0.5 — 2018-03-17
- 0.0.4 — 2018-03-17
- 0.0.3 — 2018-03-17
- 0.0.2 — 2018-03-17
- 0.0.1 — 2018-03-17

## README

# Microservices in express-js 

This is one package that allows to easily deploy one API based on microservices. Born after i mane one API and allows the DEV to easily skip boilerplate code and quickly deploy one API

### To install
npm i easy-microservices-app

### To use
It´s simple enough to use. You have to create your service starting with one file named "Router.js" inside of the service folder. You have to put all the services inside the same folder.

- You have it out of the box, but if you want. Create one settings json file with postgres db credentials and then use its path to start the app.

>     {
			>     "postgresql": {
			>     "user": "MY USER",
			>     "password": "PASSWORD",
			>     "database": "DB NAME",
			>     "host": "HOST",
			>     "port": 5432,
			>     "max": 20,
			>     "idleTimeoutMillis": 30000,
			>     "connectionTimeoutMillis": 20000
			>     }    
>     }

- Call start with the port and settings file location Eg : startApp(3333, './config/settings.json');

- Create one resources folder on project root

- Create the microservice folder on resources folder just created

- Microservice should have has the entry point the Router.js file. You can and should use the structure of the example file. That file has to extend from the npm RouterWorkerClass

- The file that you will use to query Db, should extend DbWOrker class of the npm if you want out of the box queries and transactions

You have one example folder named **usage_example** with one service inside **folder routers**.

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