mocket
mocket copied to clipboard
A web framework for MoonBit.
oboard/mocket
A web framework for MoonBit.
Quick Start
fn main {
let app = @mocket.new()
app.get("/", _ => "Hello, Mocket!")
app.serve(port=4000)
}
Mocket supports both js and native backends.
JavaScript Backend
Set the backend of MoonBit to js in Visual Studio Code
Command: MoonBit: Select Backend -> js
moon run src/example --target js
Native Backend
Set the backend of MoonBit to native in Visual Studio Code
Command: MoonBit: Select Backend -> native
moon run src/example --target native
Then visit http://localhost:4000
Usage
Minimum Example: https://github.com/oboard/mocket_example
Q & A
Why not moonbitlang/async ?
moonbitlang/async is a great library, but it is not supported by the js backend.
🙌快来吧!🙌
QQ 群号:949886784
