aboutsummaryrefslogtreecommitdiff
path: root/examples/tutorial01/main.rs
blob: 47623e6c41699ac787267c1f743a2dd1f039fce0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#[macro_use]
extern crate diesel;

use tosin::contrib::admin;
use tosin::urls::{url_map, UrlMap};
use tosin::Settings;

mod polls;

fn urls() -> UrlMap {
    url_map! {
        "polls" / ..polls::urls(),
        "admin" / ..admin::site::urls(),
    }
}

fn settings() -> Settings {
    Settings {
        ..Settings::default()
    }
}

tosin::main!(urls(), settings());