vapor

    0熱度

    3回答

    我正在嘗試將SQLite集成到Vapor項目中。我在Package.swift文件添加包Sqlite Provider爲: .Package(url: "https://github.com/vapor/sqlite-provider.git", majorVersion: 1, minor: 1) ,並創建了一個sqlite.json文件,config目錄下,包含 { "path"

    1熱度

    1回答

    時訪問DB執行錯誤這裏的片段(這裏是mysql的MySQL for Swift一個實例): do { try mysql.execute("INSERT INTO ...") } catch { print(error) // here will print out the actual MySQL error message return error.locali

    8熱度

    1回答

    當我嘗試安裝Vapor的CTLS包時,出現以下錯誤。 Gertrude:ctls tanner$ brew install ctls Error: No available formula with the name "ctls" ==> Searching for similarly named formulae... Error: No similarly named formulae

    0熱度

    1回答

    我剛剛更新到Vapor 2.0 beta,並且在運行時收到此錯誤。這是什麼造成的? fatal error: Error raised at top level: Configuration error: Key `hash.encoding` in `Config/crypto.json` of type String required.: file /Library/Caches/com.ap

    1熱度

    4回答

    我目前正在按照他們的網站上的「Hello World」教程對Swift Vapor進行簡短的介紹。但是,當我嘗試構建顯示以下內容的項目時,我不斷收到swift-package中的錯誤。 $ vapor build No .build folder, fetch may take a while... Fetching Dependencies [Failed] Error: swift-pa

    2熱度

    1回答

    我是網絡開發的新手,無法找到明確的答案。 是否可以在Swift中使用Bootstrap中的Swift 3?

    2熱度

    1回答

    在蒸汽項目,我的文件夾結構如下: Package.swift Sources/ -App/ -Module1/ -File1.swift -File2.swift -File3.swift -Module2/ -File4.swift -File5.swift -File6.swift 在他

    0熱度

    1回答

    我使用Swift和Vapor(服務器端)創建基本CRUD。 在我的控制器中,我創建了一個新的方法:「編輯」。在這種方法中,可以更新用戶的密碼和角色。 如果請求有密碼數據,更新密碼。 IF請求有一個新的角色數組,更新角色(兄弟姐妹關係至今尚未完成)。 這是在我的控制器中的「編輯」的方法: func edit(request:Request, id:String) throws -> Response

    0熱度

    1回答

    這是模型,我必須使用mongokitten將其更改爲mongo模型。 這是我的朋友模型,我已經實施。 這但不能爲這個模式做一個像結構一樣的嵌套json。 import Foundation import Vapor import Fluent struct Friend: Model { var exists: Bool = false var id: No

    2熱度

    1回答

    我正在使用Vapor編寫簡單的網絡應用程序。我有一個實體將會話信息保存到數據庫中。這個實體的代碼如下: struct SessionToken: Model{ var exists: Bool = false var id: Node? var username: String var accessToken: String var expiryD