How to build a Vapor Docker image with an environment variable?

I use Docker images when developing apps with Vapor. It’s a great way to run the code in the final deployment environment right from the start of the project. I use environment variables to direct the code execution and Docker provides a nice way to set them when building an…

How to set a port number for Vapor server on localhost

Vapor defaults to port 8080 on localhost. I couldn’t use the 8080, since that was reserved for another server on my MacBook Pro. Here’s how I set a different port number from the command line. swift run Run –hostname localhost –port 9000 This works with Vapor Framework 3.0.8 and Toolbox…