web: migrate from lib->bin
This commit is contained in:
25
web/src/main.rs
Normal file
25
web/src/main.rs
Normal file
@@ -0,0 +1,25 @@
|
||||
// (Lines like the one below ignore selected Clippy rules
|
||||
// - it's useful when you want to check your code with `cargo make verify`
|
||||
// but some rules are too "annoying" or are not applicable for your case.)
|
||||
#![allow(clippy::wildcard_imports)]
|
||||
|
||||
use log::Level;
|
||||
use seed::{prelude::wasm_bindgen, App};
|
||||
|
||||
mod api;
|
||||
mod consts;
|
||||
mod graphql;
|
||||
mod state;
|
||||
mod view;
|
||||
|
||||
fn main() {
|
||||
// This provides better error messages in debug mode.
|
||||
// It's disabled in release mode so it doesn't bloat up the file size.
|
||||
#[cfg(debug_assertions)]
|
||||
console_error_panic_hook::set_once();
|
||||
|
||||
let lvl = Level::Info;
|
||||
console_log::init_with_level(lvl).expect("failed to initialize console logging");
|
||||
// Mount the `app` to the element with the `id` "app".
|
||||
App::start("app", state::init, state::update, view::view);
|
||||
}
|
||||
Reference in New Issue
Block a user