MCPcopy Create free account
hub / github.com/OctaneWeb/Octane / with_router

Method with_router

src/server.rs:104–106  ·  view source on GitHub ↗

Appends** the router routes to the routes that the server instance holds, this allows you to independently add routes to a route Router structure and then use it with the server struct # Example ``` use octane::prelude::*; let mut app = Octane::new(); let mut router = Router::new(); router.get("/", route!(|req, res| { res.send("It's a get request!!"); Flow::Stop })); router.post("/", route!(|re

(&mut self, router: Router)

Source from the content-addressed store, hash-verified

source not stored for this graph (policy: none)

Callers 1

basic_routerFunction · 0.80

Calls 1

appendMethod · 0.45

Tested by

no test coverage detected