Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: vulnerability scan workflow

on: push

jobs:
meterian_scan:
name: Meterian client opensource scan
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Scan project with the Meterian client
uses: MeterianHQ/meterian-github-action@v1.0.17
with:
cli_args: "--oss" #[ Meterian CLI Options ]
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
# microjs
Examples of microservices written using NodeJS


[![security status](https://qa.meterian.io/badge/pb/7c6196f9-2f53-44fa-bdd2-2bb986e5b034/security)](https://qa.meterian.io/projects/?pid=7c6196f9-2f53-44fa-bdd2-2bb986e5b034) [![stability status](https://qa.meterian.io/badge/pb/7c6196f9-2f53-44fa-bdd2-2bb986e5b034/stability)](https://qa.meterian.io/projects/?pid=7c6196f9-2f53-44fa-bdd2-2bb986e5b034) [![licensing status](https://qa.meterian.io/badge/pb/7c6196f9-2f53-44fa-bdd2-2bb986e5b034/licensing)](https://qa.meterian.io/projects/?pid=7c6196f9-2f53-44fa-bdd2-2bb986e5b034)

In this first example we see an implementation of a self-discovery architectural pattern, using a central registry, where microservices enlist themselves while they can get information about others. Please note that this is an extremely simple example: do not use it in production and, generally, use it at your own risk :) (I dropped water on my laptop using it! solution? put your laptop in a drawer full of rice for the night, it works like a charm!)

The registry will start at port #3000, while the other services (time and rand) can be started at different ports: as soon as they are alive, they register themselves on the registry. The registry itself continuosly check that the registered services are still alive and kicking callling a /ping endpoint. The registry will be queried by the "hello" servlice in order to know where he can find the other two, used to produce its final output.
Expand Down