Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/Macro-swift/MacroExpress
An unopinionated SwiftNIO based web framework, Express.js/Connect like.
https://github.com/Macro-swift/MacroExpress
macroexpress swift swiftnio
Last synced: about 2 months ago
JSON representation
An unopinionated SwiftNIO based web framework, Express.js/Connect like.
- Host: GitHub
- URL: https://github.com/Macro-swift/MacroExpress
- Owner: Macro-swift
- License: apache-2.0
- Created: 2020-01-08T15:04:37.000Z (over 4 years ago)
- Default Branch: develop
- Last Pushed: 2024-07-14T16:47:49.000Z (3 months ago)
- Last Synced: 2024-07-15T16:56:45.607Z (2 months ago)
- Topics: macroexpress, swift, swiftnio
- Language: Swift
- Homepage:
- Size: 395 KB
- Stars: 49
- Watchers: 4
- Forks: 4
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
README
MacroExpress
A small, unopinionated "don't get into my way" / "I don't wanna `wait`"
asynchronous web framework for Swift.
With a strong focus on replicating the Node APIs in Swift.
But in a typesafe, and fast way.MacroExpress is a more capable variant of
[µExpress](https://github.com/NozeIO/MicroExpress).
The goal is still to keep a small core, but add some
[Noze.io](http://noze.io)
modules and concepts.MacroExpress adds the web framework components to
[Macro](https://github.com/Macro-swift/Macro/)
(kinda like `Express.js` adds to `Node.js`).[MacroLambda](https://github.com/Macro-swift/MacroLambda) has the bits to
directly deploy MacroExpress applications on AWS Lambda.
[MacroApp](https://github.com/Macro-swift/MacroApp) adds a SwiftUI-style
declarative DSL to setup MacroExpress routes.## What does it look like?
The Macro [Examples](https://github.com/Macro-swift/Examples) package
contains a few examples which all can run straight from the source as
swift-sh scripts.```swift
#!/usr/bin/swift sh
import MacroExpress // @Macro-swiftlet 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)
```## Environment Variables
- `macro.core.numthreads`
- `macro.core.iothreads`
- `macro.core.retain.debug`
- `macro.concat.maxsize`
- `macro.streams.debug.rc`
- `macro.router.debug`
- `macro.router.matcher.debug`
- `macro.router.walker.debug`### Links
- [Macro](https://github.com/Macro-swift/Macro/)
- [µExpress](http://www.alwaysrightinstitute.com/microexpress-nio2/)
- [Noze.io](http://noze.io)
- [SwiftNIO](https://github.com/apple/swift-nio)
- JavaScript Originals
- [Connect](https://github.com/senchalabs/connect)
- [Express.js](http://expressjs.com/en/starter/hello-world.html)
- Swift Apache
- [mod_swift](http://mod-swift.org)
- [ApacheExpress](http://apacheexpress.io)### Who
**MacroExpress** is brought to you by
[Helge Heß](https://github.com/helje5/) / [ZeeZide](https://zeezide.de).
We like feedback, GitHub stars, cool contract work,
presumably any form of praise you can think of.There is a `#microexpress` channel on the
[Noze.io Slack](http://slack.noze.io/). Feel free to join!