Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/bsovs/ecse437
https://github.com/bsovs/ecse437
Last synced: about 1 month ago
JSON representation
- Host: GitHub
- URL: https://github.com/bsovs/ecse437
- Owner: bsovs
- Created: 2022-11-29T18:12:16.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2022-12-06T20:54:53.000Z (about 2 years ago)
- Last Synced: 2024-03-31T06:34:38.029Z (9 months ago)
- Language: JavaScript
- Size: 356 KB
- Stars: 0
- Watchers: 2
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
[![Moleculer](https://badgen.net/badge/Powered%20by/Moleculer/0e83cd)](https://moleculer.services)
[![Codacy Badge](https://app.codacy.com/project/badge/Grade/9b581afa2baf44e1b31b6971d3676623)](https://www.codacy.com/gh/bsovs/ecse437/dashboard?utm_source=github.com&utm_medium=referral&utm_content=bsovs/ecse437&utm_campaign=Badge_Grade)# Features
- unit and integration tests to test the features of the code
- husky git hooks to run static analysis before code is even committed, reducing errors before they are run in the cloud
- eslint code format linting (static analysis) for code quality, and common javascript errors
- github workflows to run CI/CD on push, pull-request, and merge on main## NPM scripts
- `npm run build`: Build the services as a Docker container for production
- `npm run dev`: Start development mode (load all services locally with hot-reload & REPL)
- `npm run start`: Start production mode (set `SERVICES` env variable to load certain services)
- `npm run lint`: Run ESLint
- `npm run ci`: Run continuous test mode with watching
- `npm test`: Run tests & generate coverage report
- `npm run integration`: Run integration tests
- `npm run dc:up`: Start the stack with Docker Compose
- `npm run dc:down`: Stop the stack with Docker Compose# About this Project
## moleculer-demo
This is a [Moleculer](https://moleculer.services/)-based microservices project. Generated with the [Moleculer CLI](https://moleculer.services/docs/0.14/moleculer-cli.html).### Usage
Start the project with `npm run dev` command.
After starting, open the http://localhost:3000/ URL in your browser.
On the welcome page you can test the generated services via API Gateway and check the nodes & services.In the terminal, try the following commands:
- `nodes` - List all connected nodes.
- `actions` - List all registered service actions.
- `call greeter.hello` - Call the `greeter.hello` action.
- `call greeter.welcome --name John` - Call the `greeter.welcome` action with the `name` parameter.
- `call products.list` - List the products (call the `products.list` action).### Services
- **api**: API Gateway services
- **greeter**: Sample service with `hello` and `welcome` actions.
- **products**: Sample DB service. To use with MongoDB, set `MONGO_URI` environment variables and install MongoDB adapter with `npm i moleculer-db-adapter-mongo`.
- **db.mixin**: Database access mixin for services. Based on [moleculer-db](https://github.com/moleculerjs/moleculer-db#readme)