https://github.com/ignatandrei/microservicesportchooser
If you have multiple microservices and do not know how to choose a port, generate same static port number every time
https://github.com/ignatandrei/microservicesportchooser
Last synced: 11 months ago
JSON representation
If you have multiple microservices and do not know how to choose a port, generate same static port number every time
- Host: GitHub
- URL: https://github.com/ignatandrei/microservicesportchooser
- Owner: ignatandrei
- License: mit
- Created: 2021-08-12T00:22:40.000Z (almost 5 years ago)
- Default Branch: main
- Last Pushed: 2024-03-15T04:41:55.000Z (over 2 years ago)
- Last Synced: 2025-08-01T04:24:21.031Z (12 months ago)
- Language: C#
- Homepage: https://microservicesportchooser.azurewebsites.net/
- Size: 1.75 MB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 6
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# MicroservicesPortChooser
If you have multiple microservices and do not know how to choose a port, generate same static port number every time for the name of the application
Also, you can have a list of the microservices and their ports.
## Demo
https://microservicesportchooser.azurewebsites.net/
## Swagger / OpenAPI
https://microservicesportchooser.azurewebsites.net/swagger/index.html
## How to deploy on your microservice platform
Download your release :
### Windows x64:
Download https://github.com/ignatandrei/MicroservicesPortChooser/releases/latest/download/releaseWin.zip/
and start the application with the following command:
MicroservicesPortChooser --urls http://0.0.0.0:24079
Read more at https://docs.microsoft.com/en-us/aspnet/core/fundamentals/servers/kestrel/endpoints?view=aspnetcore-5.0
### IIS x64:
Download https://github.com/ignatandrei/MicroservicesPortChooser/releases/latest/download/releaseIISWin.zip/
Install ASP.NET Core Module from https://docs.microsoft.com/en-us/aspnet/core/host-and-deploy/aspnet-core-module?view=aspnetcore-5.0
Read more https://docs.microsoft.com/en-us/aspnet/core/host-and-deploy/iis/?view=aspnetcore-5.0
### Linux x64:
Download https://github.com/ignatandrei/MicroservicesPortChooser/releases/latest/download/releaseLin.zip/
NGINX : read https://docs.microsoft.com/en-us/aspnet/core/host-and-deploy/linux-nginx?view=aspnetcore-5.0
APACHE: https://docs.microsoft.com/en-us/aspnet/core/host-and-deploy/linux-apache?view=aspnetcore-5.0
## How to use in your application
### .NET Core
Make a HttpClient and call the service with the following url:
https://microservicesportchooser.azurewebsites.net/api/v1/PortChooser/GetDeterministicPortFrom/{serviceName}
Or add the Nuget package

and follow the instructions
### Expres
```javascript
const express = require('express');
const axios = require('axios');
const app = express();
app.get('/', function (req, res) {
res.send('hello world');
})
//replace test with your service name
axios.get('https://microservicesportchooser.azurewebsites.net/api/v1/PortChooser/GetDeterministicPortFrom/test')
.then(function (response) {
app.listen(Number(response.data));
})
.catch(function (error) {
// handle error
console.log(error);
});
```
### Releases
Windows x64: https://github.com/ignatandrei/MicroservicesPortChooser/releases/latest/download/releaseWin.zip/
IIS x64: https://github.com/ignatandrei/MicroservicesPortChooser/releases/latest/download/releaseIISWin.zip/
Linux x64: https://github.com/ignatandrei/MicroservicesPortChooser/releases/latest/download/releaseLin.zip/
Versioning: https://microservicesportchooser.azurewebsites.net/ams
Source Code: https://github.com/ignatandrei/MicroservicesPortChooser/
Nuget :

PR Welcomed!