muchas-framework
Muchas Framework - NodeJS Microservice Framework
Last updated 2 months ago by shadowlik .
ISC · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install muchas-framework 
SYNC missed versions from official npm registry.

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

Level Priority
error 0
warn 1
info 2
verbose 3
debug 4
silly 5

Loading Flow

Google Draw

Big thanks to

Current Tags

  • 0.0.120                                ...           latest (2 months ago)

110 Versions

  • 0.0.120                                ...           2 months ago
  • 0.0.119                                ...           2 months ago
  • 0.0.117                                ...           2 months ago
  • 0.0.116                                ...           2 months ago
  • 0.0.115                                ...           2 months ago
  • 0.0.114                                ...           2 months ago
  • 0.0.113                                ...           3 months ago
  • 0.0.112                                ...           3 months ago
  • 0.0.111                                ...           3 months ago
  • 0.0.110                                ...           4 months ago
  • 0.0.109                                ...           4 months ago
  • 0.0.108                                ...           4 months ago
  • 0.0.107                                ...           4 months ago
  • 0.0.106                                ...           4 months ago
  • 0.0.104                                ...           4 months ago
  • 0.0.103                                ...           4 months ago
  • 0.0.102                                ...           4 months ago
  • 0.0.101                                ...           4 months ago
  • 0.0.100                                ...           4 months ago
  • 0.0.99                                ...           4 months ago
  • 0.0.98                                ...           5 months ago
  • 0.0.97                                ...           5 months ago
  • 0.0.96                                ...           5 months ago
  • 0.0.95                                ...           5 months ago
  • 0.0.94                                ...           5 months ago
  • 0.0.93                                ...           5 months ago
  • 0.0.92                                ...           5 months ago
  • 0.0.91                                ...           5 months ago
  • 0.0.90                                ...           5 months ago
  • 0.0.89                                ...           6 months ago
  • 0.0.88                                ...           6 months ago
  • 0.0.87                                ...           6 months ago
  • 0.0.86                                ...           6 months ago
  • 0.0.85                                ...           6 months ago
  • 0.0.84                                ...           6 months ago
  • 0.0.82                                ...           6 months ago
  • 0.0.81                                ...           7 months ago
  • 0.0.80                                ...           7 months ago
  • 0.0.79                                ...           7 months ago
  • 0.0.78                                ...           7 months ago
  • 0.0.77                                ...           7 months ago
  • 0.0.76                                ...           7 months ago
  • 0.0.75                                ...           7 months ago
  • 0.0.74                                ...           8 months ago
  • 0.0.73                                ...           9 months ago
  • 0.0.72                                ...           9 months ago
  • 0.0.71                                ...           9 months ago
  • 0.0.70                                ...           9 months ago
  • 0.0.69                                ...           9 months ago
  • 0.0.68                                ...           9 months ago
  • 0.0.67                                ...           9 months ago
  • 0.0.66                                ...           9 months ago
  • 0.0.65                                ...           9 months ago
  • 0.0.64                                ...           9 months ago
  • 0.0.63                                ...           9 months ago
  • 0.0.62                                ...           9 months ago
  • 0.0.61                                ...           9 months ago
  • 0.0.60                                ...           9 months ago
  • 0.0.59                                ...           9 months ago
  • 0.0.58                                ...           9 months ago
  • 0.0.57                                ...           9 months ago
  • 0.0.56                                ...           9 months ago
  • 0.0.55                                ...           9 months ago
  • 0.0.54                                ...           9 months ago
  • 0.0.53                                ...           9 months ago
  • 0.0.52                                ...           9 months ago
  • 0.0.51                                ...           9 months ago
  • 0.0.50                                ...           9 months ago
  • 0.0.48                                ...           9 months ago
  • 0.0.47                                ...           9 months ago
  • 0.0.46                                ...           9 months ago
  • 0.0.45                                ...           9 months ago
  • 0.0.44                                ...           10 months ago
  • 0.0.43                                ...           10 months ago
  • 0.0.42                                ...           10 months ago
  • 0.0.41                                ...           a year ago
  • 0.0.40                                ...           a year ago
  • 0.0.37                                ...           a year ago
  • 0.0.36                                ...           a year ago
  • 0.0.35                                ...           a year ago
  • 0.0.34                                ...           a year ago
  • 0.0.33                                ...           a year ago
  • 0.0.32                                ...           a year ago
  • 0.0.31                                ...           a year ago
  • 0.0.30                                ...           a year ago
  • 0.0.29                                ...           a year ago
  • 0.0.28                                ...           a year ago
  • 0.0.27                                ...           a year ago
  • 0.0.25                                ...           a year ago
  • 0.0.24                                ...           a year ago
  • 0.0.23                                ...           a year ago
  • 0.0.22                                ...           a year ago
  • 0.0.21                                ...           a year ago
  • 0.0.20                                ...           a year ago
  • 0.0.19                                ...           a year ago
  • 0.0.18                                ...           a year ago
  • 0.0.17                                ...           a year ago
  • 0.0.16                                ...           a year ago
  • 0.0.15                                ...           a year ago
  • 0.0.14                                ...           a year ago
  • 0.0.13                                ...           a year ago
  • 0.0.12                                ...           a year ago
  • 0.0.11                                ...           a year ago
  • 0.0.10                                ...           a year ago
  • 0.0.9                                ...           a year ago
  • 0.0.8                                ...           a year ago
  • 0.0.5                                ...           a year ago
  • 0.0.4                                ...           a year ago
  • 0.0.2                                ...           a year ago
  • 0.0.1                                ...           a year ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 110
Dependencies (61)
Dev Dependencies (0)
None
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |