Skip to content

Messing Around with Microservices, restful connection, websockets etc

Notifications You must be signed in to change notification settings

TheMaskMaker/PageSocket

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

A simple psuedo-microservice

Explanation

A node server sets up a simple html page with just a button and a script. It will mock up some cookie data based on a name you can input, some id, and the number of times you views the page. Then it opens a web socket with the gateway, and passes the info. The gateway makes a RESTquest to another server which counts the page views and servers up some text. The gateway sends the response back to the page over the websocket, and the page updates itself. Everything logs way too much information, mostly for debugging reasons and tracking the data exchange. Enjoy.

Setup

  1. get docker and docker compose
  2. from the root of this run: ''' docker-compose build docker-compose up '''
  3. head to localhost:3000 on your favorite browser (chrome)
  4. Click the button

Issues

no docker compose

Well, this will be annoying. You need to manually run each container, and do service BEFORE gateway so you can link them. Don't forget to -e the environment variables.

About

Messing Around with Microservices, restful connection, websockets etc

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published