Skip to content

chukwuemekachm/micro-service

Repository files navigation

micro-service

CircleCI Coverage Status License: MIT

A simple stateless microservice in Nodejs, with three major functionalities -

  • Authentication
  • JSON patching
  • Image Thumbnail Generation

Getting Started

Before you proceed, setup an account on Sentry and obtain a DSN key.

To setup micro-service, the following should be installed on your machine.

Installation

If you have all the prerequisites you can use the steps below to setup micro-service locally.

Clone micro-service
  • Open your terminal and cd to the directory where you will like to download micro-service, then run
git clone https://github.com/chukwuemekachm/micro-service.git
  • Change to the micro-service directory
cd micro-service
Setup env variables
cp .env-sample .env
  • Replace the .env values with your preferred values
Install Dependencies
  • Run the commands below to install the required node dependencies
npm install yarn -g
yarn install
yarn bootstrap

Usage

  • To start up your newly installed micro-service run
yarn start
  • You should see an output similar this on the terminal
info: 'Identity service listening on port ' 3001 {"service":"identity-service"}
info: 'Json service listening on port ' 3002 {"service":"json-service"}
2019-09-25T11:56:46.214Z [EG:gateway] info: gateway http server listening on :::3000
info: 'Image service listening3 on port ' 3003 {"service":"image-service"}

Running Tests

  • To run the automated tests on your newly installed micro-service run
yarn test

Built With

API Docs

Author

License

This project is licensed under the MIT License - see the LICENSE.md file for details