Skip to content

MartianBitcoins/Index

Repository files navigation

Martian Bitcoins Index (MBI)

Microservices

Docker

PostgreSQL MongoDB

Node.js

React.js

is a full-stack open source solution for Universal/Isomorphic web apps using PostgreSQL, React.js, Node.js, Koa.js and microservices. The idea is to cover the most common use cases for Universal web applications.

The project consist on three different micro-services:

API This is the server that is public to the internet, here we communicate with the browsers and our web client app, the API knows how to access the database and when it needs to do a server side render it calls or web-app files it calls the web-app renderer for them.

web-app renderer Receives state from the api, render the react app and put it in the index template, the returns the hole site to the api. Also serve the static files of the web app (images, fonts, etc) and the app itself (javascript file) and serve them. Note: Web-app renderer should not serve static files in the future, this should be done by an http server.

Database (Just development) When using docker for development a postgreSQL container is created with the initial schema and some test data.

Development

Database

Create Database

docker network create -d bridge mbi-network
docker run -it --name mbi-mongodb -p 27017:27017 --network=mbi-network mongo:3.6.8-stretch

Start Database

docker start mbi-mongodb

Attach Database stdin

docker attach mbi-mongodb

API

Create API Container

npm run build-dev

Start API Container

npm run up-dev

Web app

Build Web App

npm run build-dev

Start Web App

npm run up-dev

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages