chyabrung-cli 0.2.4

The `chy` command line tool for Chyabrung: scaffolding, dev server with hot reload, builds, generators, migrations and one-command deploys
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
//! # Web routes: pages people open in a browser
//!
//! Put HTML pages here: the home page, an about page, a dashboard. The
//! browser's WebSocket lives here too. JSON endpoints belong in `api.rs`.
//!
//! ```ignore
//! route.get("/about", PageController::about);
//! ```

use crate::controllers::*;
use chyabrung::prelude::*;

/// The browser routes.
pub fn routes(route: &mut Route) {
    route.get("/", welcome); // the welcome page: replace it with your own handler
    route.get("/ws", RealtimeController::socket);
}