- GeoSwift
- libressl
- use brew to install on macOS:
brew install libressl
- use brew to install on macOS:
- RoadChatKit
Warning: Vapor 3 now depends on Swift 4.1. Please follow this tutorial to build and run the app locally in Xcode.
Also, in order to support command line development you will have to set the Swift version to be used via swiftenv:
swiftenv versions
swiftenv local <choose swift 4.1 snapshot here>
Please use the Swift Package Manager to create an Xcode project file, since this repository purposefully excludes it to preserve a developer's individual IDE settings. Again, Vapor Toolbox will not be necessary or required for setup.
swift package generate-xcodeproj
Product > Scheme > Run
Xcode > Toolchains > <choose swift 4.1 snapshot here>
The theory here is that you will build and run a Swift container, mounting your project directory, then keep it open during development using command-line Swift to build, test and run your project (see tutorial).
Using Xcode? Then by all means build as you go in Xcode (it’s faster than building in Linux) but don’t forget to build and test in your container from time to time, and you should always run from it. Xcode and Linux use different build directories, so always swift build before you swift run to ensure your Linux build is up-to-date.
Workflow
- Build & run the development docker container:
docker build -t roadchat:dev -f Dockerfile-dev . && docker run -it -p 8080:8080 -v "$PWD":/app --privileged --rm roadchat:dev
- For any source code changes made, rebuild the project binary:
swift build
- To start the server:
swift run Run serve --hostname 0.0.0.0
Typing out the command to build and launch the development container is really annoying: alias dockerdev='eval "`head -n 1 Dockerfile-dev | cut -c 2-`"'