Skip to content

yonatankrwalkme/versions-tracker-api

Repository files navigation

versions-manager-api

This is the back end service of the versions display application, you can get the client side application here: Versions Display.

Prerequisites:

This service uses:

  1. Node.js (Express)
  2. MySql

Getting Started:

Docker: If you are comfortable with docker, it is already setup, just run docker-compose up and it will load all the services required.

Manual:

  1. make sure you’re mySql instance is running.
  2. npm install
  3. npm start

This will run the app on port 3001

Sending Events To The Service:

This service expects to receive updates from any build tool (TC \ Jenkins…) in the following format:

{
	"projectName" : "[name]",
	"buildStatus" : "[complete]", 
	"commits" : [
        {
			"username" : "Awesome developer 1",
            "imageUrl" : "[urlToDeveloper1Image]",
			"commit_message" : "commit message"
		},
		{
			"username" : "Awesome developer 2",
            "imageUrl" : "[urlToDeveloper1Image]",
			"commit_message" : "commit message"
		},
	],
	"versionData" : {
		"version" : "1.24",
		"buildTime" : "2017-09-29 13:28:39",
		"environment" : "Production"
	}
}

Sending Updates to the client:

The service will update the client using Socket.IO by sending the event : “versionEvent” which can be

socket.on('versionEvent', versionEvent => {
    notifyClients(versionEvent);
})

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published