All Projects → Macro-swift → MacroExpress

Macro-swift / MacroExpress

Licence: Apache-2.0 license
An unopinionated SwiftNIO based web framework, Express.js/Connect like.

Programming Languages

swift
15916 projects

Projects that are alternatives of or similar to MacroExpress

Swift Nio
Event-driven network application framework for high performance protocol servers & clients, non-blocking.
Stars: ✭ 6,777 (+15302.27%)
Mutual labels:  swiftnio
URLSessionWebSocketTask
This is a sample project for new URLSessionWebSocketTask API introduced in iOS 13.
Stars: ✭ 53 (+20.45%)
Mutual labels:  swiftnio
swift-mqtt
MQTT client for Swift using SwiftNIO
Stars: ✭ 33 (-25%)
Mutual labels:  swiftnio
Kitura-NIO
A networking library for Kitura, based on SwiftNIO
Stars: ✭ 35 (-20.45%)
Mutual labels:  swiftnio

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. The goal is still to keep a small core, but add some Noze.io modules and concepts.

MacroExpress adds the web framework components to Macro (kinda like Express.js adds to Node.js).

MacroLambda has the bits to directly deploy MacroExpress applications on AWS Lambda. MacroApp adds a SwiftUI-style declarative DSL to setup MacroExpress routes.

What does it look like?

The Macro Examples package contains a few examples which all can run straight from the source as swift-sh scripts.

#!/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)

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

Who

MacroExpress is brought to you by the Always Right Institute and ZeeZide. 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. Feel free to join!

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].