我刚刚开始快速后端开发。我注意到Vapor&安装swift packange经理(Swiftenv)。我按照instruction按照以下方式安装Vapor CLI:
wget cli.qutheory.io -O vapor
但不断得到错误:
Resolving cli.qutheory.io... 138.197.255.240
Connecting to cli.qutheory.io|138.197.255.240|:80... connected.
HTTP request sent, awaiting response... 404 Not Found
2016-08-07 10:41:15 ERROR 404: Not Found.
任何人都面临同样的问题?如何摆脱它?
我还尝试了另一种方式:
curl -L cli.qutheory.io -o vapor
输出结果为:
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 38 100 38 0 0 21 0 0:00:01 0:00:01 --:--:-- 21
然后,我运行命令:
chmod +x vapor
然后:
sudo mv vapor /usr/local/bin
然后:
vapor self-update
但我得到错误:
/usr/local/bin/vapor: line 1: error:1: command not found
如何安装蒸汽CLI?
答案 0 :(得分:2)
Vapor团队刚刚发布了新的设置工具。使用xCode Beta 4,以下内容对我有用:
UIView.animateKeyframesWithDuration(2.0, delay: 0.0, options: UIViewKeyframeAnimationOptions.CalculationModeLinear, animations: {
UIView.addKeyframeWithRelativeStartTime(0.25, relativeDuration: 0.25, animations: {
self.redView.alpha = 0.0
})
UIView.addKeyframeWithRelativeStartTime(0.75, relativeDuration: 0.25, animations: {
self.blueView.alpha = 1.0
})
}, completion: nil)
swiftenv local DEVELOPMENT-SNAPSHOT-2016-07-25-a
curl -sL toolbox.qutheory.io | bash
vapor build
vapor xcode
然后您应该能够导入Vapor并开始播放。
如果不起作用,请先检查蒸汽状态:
y
&安培;然后逐字逐句地阅读本文[https://stormpath.com/blog/tutorial-build-first-swift-web-app-vapor]。你必须匹配他的快速开发快照版本,否则它将无法工作。