Simple REST API application.
This application has to endpoint:
- HTTP GET
API_URL/api/infoExample:
{
"env":"production",
"hostname":"ac7402803609",
"port":"8000"
}
- HTTP GET
API_URL/api/dateExample:
{
"date_time":"01/09/2021, 20:41:24",
"day":"09","month":"01",
"time":"20:41:24","year":"2021"
}
docker build -t api .
By deafault application use 5000/TCP port for incoming requests.
docker run -p 5000:5000 --name api --rm -it api
Use other port e.g. 8000/TCP
docker run -p 8000:8000 -e PORT=8000 --name api --rm -it api