GithubHelp home page GithubHelp logo

isabella232 / project-demo Goto Github PK

View Code? Open in Web Editor NEW

This project forked from moleculerjs/project-demo

0.0 0.0 0.0 20 KB

Demo Project. Generated by official "project" template

JavaScript 59.33% Dockerfile 0.35% HTML 40.06% Shell 0.25%

project-demo's Introduction

Moleculer

project-demo

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 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

Useful links

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

project-demo's People

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.