> For the complete documentation index, see [llms.txt](https://kagura.gitbook.io/kagura-nusa-en/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://kagura.gitbook.io/kagura-nusa-en/hello-world/creates-a-page.md).

# Creates a Page

## Mounts Html to Real-DOM

`kagura::Runtime` needs node with implements `UpdateNode + RenderNode<VecDeque<FutureMsg>> + 'static`. Therefore, a renderer is needead to render Html to real-DOM, and one of the renderer is `BasicDomNode`.

`BasicDomNode` needs two arguments. One is `web_sys::Node` as mount point. Another is a function which retuns `Vec<Html>`. The argument for this function will be used when you mount components to `Html`.

{% code title="src/lib.rs" %}

```rust
extern crate js_sys;
extern crate kagura;
extern crate nusa;
extern crate wasm_bindgen;
extern crate wasm_bindgen_futures;
extern crate web_sys;

use nusa::html::html_element::Attributes;
use nusa::html::html_element::Events;
use nusa::Html;
use wasm_bindgen::prelude::*;

#[wasm_bindgen(start)]
pub fn main() {
    wasm_bindgen_futures::spawn_local(async {
        kagura::Runtime::run(nusa::dom_node::BasicDomNode::new(entry_point(), |_| {
            vec![Html::h1(
                Attributes::new(),
                Events::new(),
                vec![Html::text("Hello World")],
            )]
        }))
        .await;
    });
}

fn entry_point() -> web_sys::Node {
    web_sys::window()
        .unwrap()
        .document()
        .unwrap()
        .get_element_by_id("app")
        .unwrap()
        .into()
}

```

{% endcode %}

### to View Page

start `wabpack-dev-server:`

```bash
npm start
```

access to: <localhost:8080>
