一个小型、不固执己见的“别挡我的路”/“我不想wait”的 Swift 异步 Web 框架。 强烈关注在 Swift 中复制 Node API。 但以类型安全且快速的方式进行。
MacroExpress 是 µExpress 的更强大的变体。 目标仍然是保持一个小的核心,但添加一些 Noze.io 模块和概念。
MacroExpress 将 Web 框架组件添加到 Macro (有点像 Express.js 添加到 Node.js)。
MacroLambda 拥有直接在 AWS Lambda 上部署 MacroExpress 应用程序的功能。 MacroApp 添加了一个 SwiftUI 风格的声明式 DSL 来设置 MacroExpress 路由。
Macro Examples 包包含一些示例,所有这些示例都可以直接从源代码作为 swift-sh 脚本运行。
#!/usr/bin/swift sh
import MacroExpress // @Macro-swift
let app = express()
app.use(logger("dev"))
app.use(bodyParser.urlencoded())
app.use(serveStatic(__dirname() + "/public"))
app.get("/hello") { req, res, next in
res.send("Hello World!")
}
app.get { req, res, next in
res.render("index")
}
app.listen(1337)
macro.core.numthreadsmacro.core.iothreadsmacro.core.retain.debugmacro.concat.maxsizemacro.streams.debug.rcmacro.router.debugmacro.router.matcher.debugmacro.router.walker.debugMacroExpress 由 Helge Heß / ZeeZide 提供。 我们喜欢反馈、GitHub star、酷的合同工作,大概是任何你能想到的赞美形式。
想要支持我的工作? 购买一个应用程序:Code for SQLite3, Past for iChat, SVG Shaper, HMScriptEditor. 你不必使用它! 😀