Skip to content

byavv/microservices-workflow

Repository files navigation

Circle CI

Microservices workflow (Node.js, Angular2, Seneca, Mosca, MQTT)

Note! Angular 2 is in beta7

What we've got here

  • Implementation of microservices architect for Node.js apps via Seneca and Mosca. The application is split up into a number of microservices, wrapped in docker containers.
  • Angular 2 for frontend.
  • Environment for testing and development microservices separately from others.

Requirements

Quick start

install globals:

npm install -g gulp mocha

buld containers:

docker-compose build

Have a cup of coffee... or two, it is a long process, then:

docker-compose up

Go to localhost:3030

Development

Every application component (microservice) is launched in its own container. It's a big overhead to build container every time you make changes. To tackle this, start microservice, you are working on via gulp or whatever, and microservices, it depends on - in their own containers. To rich microservices, running in containers, docker-compose exports http ports when they are started in dev mode (using default docker-compose.yml). So, you have to be sure that your containers are reachable for your "host" environment.

Start dependencies within containers:

docker-compose up mongo redis broker logger users

and (users microservice should be richable for host) Move to microservice folder:

cd src/web

Install deps:

npm install 
#in case of web microservice
typings install
gulp build

Start default gulp task to watch you changes and automatically rebuild when changes occur:

gulp

Testing

Each microservice can be tested separately. For now, unit tests only. ##Contribution Feel free to contribute. This project is a playground and my first experience in microservices architect, so I would appreciate any new ideas.

About

Node.js microservices workflow

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors