This is the back end service of the versions display application, you can get the client side application here: Versions Display.
This service uses:
- Node.js (Express)
- MySql
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:
- make sure you’re mySql instance is running.
- npm install
- npm start
This will run the app on port 3001
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"
}
}
The service will update the client using Socket.IO by sending the event : “versionEvent” which can be
socket.on('versionEvent', versionEvent => {
notifyClients(versionEvent);
})