Skip to content

Microservice template for running a single Microservice with separate Client and API.

Notifications You must be signed in to change notification settings

Dockerbound-Immortal/Mongo-Nginx-Gateway-Microservice-Template

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

Microservice template for running a single Microservice with separate Client and API.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published