A simple stateless microservice in Nodejs, with three major functionalities -
- Authentication
- JSON patching
- Image Thumbnail Generation
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.
If you have all the prerequisites you can use the steps below to setup micro-service locally.
- 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
cp .env-sample .env
- Replace the .env values with your preferred values
- Run the commands below to install the required
node
dependencies
npm install yarn -g
yarn install
yarn bootstrap
- 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"}
- To run the automated tests on your newly installed micro-service run
yarn test
- Chima Chukwuemeka @chukwuemekachm
This project is licensed under the MIT License - see the LICENSE.md file for details