Skip to content

Latest commit

 

History

History
42 lines (26 loc) · 1.5 KB

File metadata and controls

42 lines (26 loc) · 1.5 KB

Mongo-Nginx-Gateway-Microservice-Template

Microservice template with separate Client and API served via an Nginx gateway.

Usage

To utilise this template pull this repository, then cd into the API and Client and pull those subsequent repositories. You should then be able to build the containers using docker-compose.

If you do not have Docker set up you can instal Docker here.

command: docker-compose up --build -d

Nginx Gateway

Using Nginx as a gateway offers a few advantages. It allows us to hide our internal application network from the user via a reverse-proxy. This means, the client never sees our internal addresses and has no means of direct interaction with the API without first passing through out gateway. This also reduces the risk of DDOS attacks as our webserver will handle traffic and can prevent successive requests.

Ports

You can change the default setup via the Nginx.conf file located in infrastructure/webserver.

  • Nginx - :8080
  • API - :8080/api/
  • MongoExpress- :8081

Technologies

API

Client

Dependencies