TIL how to make Vapor listen port in external IP address
Hung in Improving the Beginner’s PID – Introduction. I should pass through all series. May be, reimplementing everything in Swift package swift-pid.
Read How To Open a Port on Linux. How To Set Up a Firewall with UFW on Ubuntu 22.04. It finds out that in my case a problem was not in closed port when I tried access Vapor app by external IP from another machine, but rather with the fact that by default Vapor waits for connection only from 127.0.0.1
. It has to be run like swift run App serve --hostname 164.90.230.212
to wait for connection from external IP address of its host machine: Vapor Server documentation. It funny, that book Server Side Swift never mentions how to launch Vapor app for waiting for external connections.
Read Running Vapor apps in the Cloud using Docker and Digital Ocean.
TIL AWS has special service to run containers - Amazon Elastic Container Service.
TIL what to do when Ctrl-C
doesn’t stop process. Short answer: Ctrl-Z
and if process reacts on that, then kill -9 PID
.