【发布时间】:2018-08-10 21:02:18
【问题描述】:
我要做什么
我正在按照在 macOS 上安装 Vapor 的指南https://docs.vapor.codes/2.0/getting-started/install-on-macos/
验证 Swift 安装
eval "$(curl -sL check.vapor.sh)"
支持 Vapor v 2
添加 Homebrew Tap
brew tap vapor/homebrew-tap
brew update
brew install vapor
Vapor Toolbox: 3.1.4 已安装
我的信息:
iMac(24 英寸,2009 年初)
OS X El Capitan - 版本 10.11.6
Xcode 版本 8.2.1 (8C1002)
工具链:Swift 3.1 发布 2017-03-27 (a)
https://swift.org/builds/swift-3.1-release/xcode/swift-3.1-RELEASE/swift-3.1-RELEASE-osx.pkg
** 更新 **
我克隆了两个存储库 https://github.com/vapor/api-template (b6c7df2) 和 https://github.com/vapor/web-template (d206163)
现在我可以使用 Swift 3.1 项目创建一个 Vapor v2,如下所示:
API 模板
vapor new ApiTemplate --template=https://github.com/ValeriyKliuk/vapor-2-api-template
cd ApiTemplate/
vapor xcode -y
网页模板
vapor new WebTemplate --template=https://github.com/ValeriyKliuk/vapor-2-web-template
cd WebTemplate/
vapor xcode -y
【问题讨论】: