Code Monkey home page Code Monkey logo

moleculer-node-realworld-example-app's Introduction

RealWorld Example App

Moleculer codebase containing real world examples (CRUD, auth, advanced patterns, etc) that adheres to the RealWorld 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 the RealWorld 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 at http://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 the MONGO_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 with gnatsd command. After it started, set the TRANSPORTER env variable and start services.

TRANSPORTER=nats://localhost:4222

To get the Node server running locally with Docker

  1. Checkout the repo git 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 a Traefik reverse proxy

  4. Open the http://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 with realworld-server-tester.

Local tests is missing currently.

$ npm test

In development with watching

$ npm run ci

License

This project is available under the MIT license.

Contact

Copyright (c) 2016-2017 Ice-Services

@ice-services @MoleculerJS

moleculer-node-realworld-example-app's People

Contributors

ericsimons avatar fsckyou avatar icebob avatar jaikanth-s avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

moleculer-node-realworld-example-app's Issues

traefik container can't start

I get this log output from the container before it exits.

command traefik error: no configuration found in file: /traefik.toml

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.