Skip to content

Commit 442b93d

Browse files
committed
Add sample to README.md
...
1 parent 08a8e60 commit 442b93d

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

README.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,12 @@ import MacroExpress // @Macro-swift
1919
import MacroXmlRpc // @Macro-swift
2020

2121
let app = express()
22-
app.use(logger("dev"), bodyParser.text())
2322

24-
// TODO
23+
app.route("/RPC2")
24+
.use(bodyParser.xmlRpcCall())
25+
.rpc("ping") { _ in "pong" }
26+
.rpc("add") { ( a: Int, b: Int ) in a + b }
27+
.use(xmlrpc.introspection())
2528

2629
app.listen(1337)
2730
```

0 commit comments

Comments
 (0)