Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

🌏 RealWorld example app with Moleculer microservices framework

License

NotificationsYou must be signed in to change notification settings

moleculerjs/moleculer-realworld-example-app

Repository files navigation

RealWorld Example App

Moleculer codebase containing real world examples (CRUD, auth, advanced patterns, etc) that adheres to theRealWorld spec and API.

This repo is functionality complete — PRs and issues welcome!

Live demo on Glitch:https://realworld-moleculer.glitch.me

Glitch project:https://glitch.com/edit/#!/realworld-moleculer

React + Redux front-end UI is included.For more information on how to this works with other frontends/backends, head over to theRealWorld repo.

Getting started

To get the Node server running locally:

  • Clone this repo
  • npm install to install all required dependencies
  • npm run dev to start the local server
  • the API is available athttp://localhost:3000/api

Alternately, to quickly try out this repo in the cloud, you can

Remix on Glitch

MongoDB persistent store

Basically the services stores data in an NeDB persistent file storage in the./data folder. If you have to use MongoDB, set theMONGO_URI environment variable.

MONGO_URI=mongodb://localhost/conduit

Multiple instances

You can run multiple instances of services. In this case you need to use a transporter i.e.:NATS. NATS is a lightweight & fast message broker. Download it and start withgnatsd command. After it started, set theTRANSPORTER env variable and start services.

TRANSPORTER=nats://localhost:4222

To get the Node server running locally with Docker

  1. Checkout the repogit clone https://github.com/ice-services/moleculer-realworld-example-app.git

  2. cd moleculer-realworld-example-app

  3. Start with docker-compose:docker-compose up -d

    It starts all services in separated containers, a NATS server for communication, a MongoDB server for database and aTraefik reverse proxy

  4. Open thehttp://docker-ip:3000

  5. Scale up services

    docker-compose scale api=3 articles=2 users=2 comments=2 follows=2 favorites=2

Code Overview

Dependencies

Application Structure

  • moleculer.config.js - Moleculer ServiceBroker configuration file.
  • services/ - This folder contains the services.
  • public/ - This folder contains the front-end static files.
  • data/ - This folder contains the NeDB database files.

Test

Tested withrealworld-server-tester.

Local tests is missing currently.

$ npm test

In development with watching

$ npm run ci

License

This project is available under theMIT license.

Contact

Copyright (c) 2016-2017 Ice-Services

@ice-services@MoleculerJS

About

🌏 RealWorld example app with Moleculer microservices framework

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors2

  •  
  •  

[8]ページ先頭

©2009-2025 Movatter.jp