0.0.130 • Published 4 years ago

muchas-framework v0.0.130

Weekly downloads
142
License
ISC
Repository
gitlab
Last release
4 years ago

Muchas Framework Muchas Framework

npm version CircleCI Coverage Status

WIP DOCUMENTATION

Muchas is an opinionated microservice nodejs framework. We use a set of other frameworks to build a rich ecoystem with a standard way of building applications.

Installing

npm i -s muchas-framework

How it works

We are explain using the default folder strucuture. The MuchasFr

Quick start

import MuchasFramework from 'muchas-framework';

(async () => await MuchasFramework.init())();

muchas.yml and .env

We can use two files to define our environment variables, we use the muchas.yml to help us organize our config object and a .env file for dynamic configuration values.

muchas.yml example

All the ${VARIABLE} will be replaced buy the environment variables

env: ${NODE_ENV} # Enviroment (development, production)
name: ${PROJECT_NAME} # Project name
debug: # Debug options
  port: ${DEBUG_PORT} # NodeJS debug port
web: # Web server
  port: ${SERVER_PORT} # Web server port
  headers: # Web server default response headers
    Access-Control-Allow-Origin: '*'
    Access-Control-Allow-Methods: '*'
    Access-Control-Allow-Headers: '*'
health: # Health web server
  port: 9000 # Health web server port
apm: # Application performance management
  host: ${APM_HOST} # Host
  logLevel: ${APM_LEVEL} # Level
  sample: 0.2 # Sample rate
logger: # Logger
  elasticsearch: # Elasticsearch logger
    host: ${LOGGER_ELASTIC_HOST} # Elastic host
    level: ${LOGGER_ELASTIC_LEVEL} # Log level
database: # Database
  uri: ${DATABASE_URI} # Database URI
  model: # Models
    path: ${MODELS_PATH} # Model base path
broker: # Broker
  host: ${BROKER_HOST} # Broker Host
components: # Components
  path: ${COMPONENTS_PATH} # Components base path

.env example

NODE_ENV=development
DATABASE_URI=mongodb://mongo/muchas
SERVER_PORT=6028
BROKER_HOST=rabbit
COMPONENTS_PATH=dist/tests/integration/components
MODELS_PATH=dist/tests/integration/models
LOGGER_ELASTIC_HOST=http://elastic:9200
LOGGER_ELASTIC_LEVEL=error
PROJECT_NAME=muchas
APM_HOST=http://elastic-apm:8200
APM_LEVEL=error

Web

The web application uses express under the hood

Broker

We support amqp protocol for our message broker and we encourage to use it with RabbitMQ

Message Queue

RPC (Beta)

Routines

Health

Logger

Levels

LevelPriority
error0
warn1
info2
verbose3
debug4
silly5

Loading Flow

Google Draw

Big thanks to

0.0.130

4 years ago

0.0.129

4 years ago

0.0.128

4 years ago

0.0.127

4 years ago

0.0.126

4 years ago

0.0.125

4 years ago

0.0.124

4 years ago

0.0.123

4 years ago

0.0.122

4 years ago

0.0.121

4 years ago

0.0.119

5 years ago

0.0.120

5 years ago

0.0.117

5 years ago

0.0.116

5 years ago

0.0.115

5 years ago

0.0.114

5 years ago

0.0.113

5 years ago

0.0.112

5 years ago

0.0.111

5 years ago

0.0.109

5 years ago

0.0.108

5 years ago

0.0.110

5 years ago

0.0.107

5 years ago

0.0.106

5 years ago

0.0.104

5 years ago

0.0.103

5 years ago

0.0.102

5 years ago

0.0.101

5 years ago

0.0.100

5 years ago

0.0.99

5 years ago

0.0.98

5 years ago

0.0.97

5 years ago

0.0.96

5 years ago

0.0.95

5 years ago

0.0.94

5 years ago

0.0.93

5 years ago

0.0.92

5 years ago

0.0.90

5 years ago

0.0.91

5 years ago

0.0.89

5 years ago

0.0.88

5 years ago

0.0.87

5 years ago

0.0.86

5 years ago

0.0.85

5 years ago

0.0.84

5 years ago

0.0.82

5 years ago

0.0.81

5 years ago

0.0.80

5 years ago

0.0.79

5 years ago

0.0.78

5 years ago

0.0.77

5 years ago

0.0.76

5 years ago

0.0.75

5 years ago

0.0.74

5 years ago

0.0.73

5 years ago

0.0.72

5 years ago

0.0.71

5 years ago

0.0.70

5 years ago

0.0.69

5 years ago

0.0.68

5 years ago

0.0.67

5 years ago

0.0.66

5 years ago

0.0.65

5 years ago

0.0.64

5 years ago

0.0.63

5 years ago

0.0.62

5 years ago

0.0.61

5 years ago

0.0.60

5 years ago

0.0.59

5 years ago

0.0.58

5 years ago

0.0.57

5 years ago

0.0.56

5 years ago

0.0.55

5 years ago

0.0.54

5 years ago

0.0.53

5 years ago

0.0.52

5 years ago

0.0.51

5 years ago

0.0.50

5 years ago

0.0.48

5 years ago

0.0.47

5 years ago

0.0.46

5 years ago

0.0.45

5 years ago

0.0.44

5 years ago

0.0.43

5 years ago

0.0.42

5 years ago

0.0.41

5 years ago

0.0.40

5 years ago

0.0.37

5 years ago

0.0.36

5 years ago

0.0.35

5 years ago

0.0.34

5 years ago

0.0.33

5 years ago

0.0.32

5 years ago

0.0.31

5 years ago

0.0.30

5 years ago

0.0.29

5 years ago

0.0.28

5 years ago

0.0.27

5 years ago

0.0.25

5 years ago

0.0.24

5 years ago

0.0.23

5 years ago

0.0.22

5 years ago

0.0.21

5 years ago

0.0.20

5 years ago

0.0.19

5 years ago

0.0.18

5 years ago

0.0.17

5 years ago

0.0.16

5 years ago

0.0.15

5 years ago

0.0.14

5 years ago

0.0.13

5 years ago

0.0.12

5 years ago

0.0.11

5 years ago

0.0.10

5 years ago

0.0.9

5 years ago

0.0.8

5 years ago

0.0.5

5 years ago

0.0.4

5 years ago

0.0.2

5 years ago

0.0.1

5 years ago