Skip to content

antomor/hapi-chairo-ms

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

hapi-chairo-ms

A small example of microservices architecture using hapi and chairo.

For more information about micro-service and api-gateway architecture Micro-services - API gateway

Getting Started

In order to running the architecture it is necessary to install all the dependecies and to run the gulp default task which starts the micro-services and the api-gateway.

Folder structure

hapi-chairo.ms/
  README.md
  node_modules/
  package.json
  plugins/
  services/
  spec/
  gulpfile.js
  server.js

Prerequisites

git clone 'https://github.com/antomor/hapi-chairo-ms.git'

Installing

We need to run the npm instal command from the directory in which the repo has been cloned

cd hapi-chairo-ms
npm install

In order to run the default gulp task:

gulp

The gulp.js file contains also other tasks:

  • run:<name-service> to start a single micro-service
  • run:services to start all the micro-service
  • run:server to start the api-gateway service
  • run:all to start the api-gateway service and all the micro-services

Running the tests

For running the tests, please make to sure to have started the application with gulp.

npm test

All the tests are in the spec folder. Each micro-service is provided with a *-spec file containing the test for that specific service.

Built With

  • Gulp - Task Runner
  • hapi - Web services framework
  • chairo - Senece micro-services plugin
  • Jasmin - For writing BDD micro-services tests

Acknowledgments

  • Thank you to PianoBit which permitted me to practice with the tools and architecture described.

About

A small example of microservices architecture using hapi and chairo.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published