Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/iitii/pic_online_backend
pic_online_backend
https://github.com/iitii/pic_online_backend
koa2 moleculer pic-online
Last synced: 7 days ago
JSON representation
pic_online_backend
- Host: GitHub
- URL: https://github.com/iitii/pic_online_backend
- Owner: IITII
- Created: 2020-09-08T01:46:10.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2025-01-03T05:38:11.000Z (24 days ago)
- Last Synced: 2025-01-15T07:05:47.470Z (12 days ago)
- Topics: koa2, moleculer, pic-online
- Language: JavaScript
- Homepage:
- Size: 123 KB
- Stars: 1
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
[![Moleculer](https://badgen.net/badge/Powered%20by/Moleculer/0e83cd)](https://moleculer.services)
# pic_online_
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`.## Mixins
- **db.mixin**: Database access mixin for services. Based
on [moleculer-db](https://github.com/moleculerjs/moleculer-db#readme)## Useful links
* Moleculer website: https://moleculer.services/
* Moleculer Documentation: https://moleculer.services/docs/0.14/## NPM scripts
- `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 cli`: Start a CLI and connect to production. Don't forget to set production namespace with `--ns` argument in
script
- `npm run lint`: Run ESLint
- `npm run ci`: Run continuous test mode with watching
- `npm test`: Run tests & generate coverage report
- `npm run dc:up`: Start the stack with Docker Compose
- `npm run dc:down`: Stop the stack with Docker Compose