0.8.2 • Published 5 years ago
ow-connect-v1 v0.8.2
v1
This is a Moleculer-based microservices project. Generated with the Moleculer CLI.
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 thegreeter.helloaction.call greeter.welcome --name John- Call thegreeter.welcomeaction with thenameparameter.call products.list- List the products (call theproducts.listaction).
Services
- api: API Gateway services
- greeter: Sample service with
helloandwelcomeactions. - products: Sample DB service. To use with MongoDB, set
MONGO_URIenvironment variables and install MongoDB adapter withnpm i moleculer-db-adapter-mongo.
Mixins
- db.mixin: Database access mixin for services. Based on moleculer-db
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 (setSERVICESenv variable to load certain services)npm run cli: Start a CLI and connect to production. Don't forget to set production namespace with--nsargument in scriptnpm run lint: Run ESLintnpm run ci: Run continuous test mode with watchingnpm test: Run tests & generate coverage reportnpm run dc:up: Start the stack with Docker Composenpm run dc:down: Stop the stack with Docker Compose
0.8.2
5 years ago