> For the complete documentation index, see [llms.txt](https://reyvaleza.gitbook.io/vibe.d-tutorial/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://reyvaleza.gitbook.io/vibe.d-tutorial/use-your-own-html-page.md).

# Use your own HTML page

Inside the **views** folder, create a new HTML file named **views\hello.html**&#x20;

with the following contents:

```html
<html>
  <head>
    <title>Hello world!</title>
  </head>
  <body>
    <h2>Hello, world!</h2>
  </body>
</html>
```

Vibe.d is a stickler to proper indentation so follow the indentation rules for HTML tags. Sometimes, your editor saves tabs as spaces so make sure the spacing in the file is consistent, either all tabs or all spaces, or you will see mysterious errors when compiling. If you encounter that, click on the indentation setting at the bottom of VS Code. Click on '**Tab Size:**'

<figure><img src="https://3936448450-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FjGPCKHCWMHsDLNzX2hV8%2Fuploads%2F3lfCuGb0lyNt08n9TjAE%2Fimage131.png?alt=media&amp;token=307ed242-1717-4e97-b612-d94304d1b61f" alt=""><figcaption></figcaption></figure>

And the drop-down indentation options will show at the top

<figure><img src="https://3936448450-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FjGPCKHCWMHsDLNzX2hV8%2Fuploads%2F558EJaAZUpfEOhcJxH26%2Fimage132.png?alt=media&amp;token=6143795b-93db-4a19-9889-e74a63fed5e3" alt=""><figcaption></figcaption></figure>

Choose **‘Convert indentations to Spaces’** or **‘Convert indentations to Tabs’**, whichever is your preference as long as you are consistent, then save the file again.

Next, edit **source\app.d** to make it display the **hello.html** page.

```d
import vibe.vibe;

void main()
{
    auto settings = new HTTPServerSettings;
    settings.port = 8080;
    settings.bindAddresses = ["::1", "127.0.0.1"];
    auto listener = listenHTTP(settings, staticTemplate!"hello.html");
    scope (exit) listener.stopListening();
    runApplication();
}
```

And delete the **hello()** function at the bottom as it is no longer called.

Stop the application if it is still running by pressing **Ctrl-C** in the terminal window (maybe twice).

Compile and run the project with dub.

c:\vibeprojects\hello>**dub**

```
     Pre-gen Running commands for openssl
    Starting Performing "debug" build using /usr/bin/dmd for x86_64.
  Up-to-date diet-ng 1.8.4: target for configuration [library] is up to date.
  Up-to-date during 0.3.0: target for configuration [default] is up to date.
  Up-to-date taggedalgebraic 1.0.1: target for configuration [library] is up to date.
  Up-to-date eventcore 0.9.39: target for configuration [epoll] is up to date.
  Up-to-date stdx-allocator 2.77.5: target for configuration [library] is up to date.
  Up-to-date vibe-container 1.7.1: target for configuration [library] is up to date.
  Up-to-date vibe-core 2.14.0: target for configuration [epoll] is up to date.
  Up-to-date vibe-inet:textfilter 1.3.1: target for configuration [library] is up to date.
  Up-to-date vibe-serialization 1.2.0: target for configuration [library] is up to date.
  Up-to-date vibe-stream 1.4.1: target for configuration [library] is up to date.
  Up-to-date vibe-inet 1.3.1: target for configuration [library] is up to date.
  Up-to-date vibe-inet:crypto 1.3.1: target for configuration [library] is up to date.
  Up-to-date vibe-stream:tls 1.4.1: target for configuration [openssl] is up to date.
  Up-to-date vibe-http 1.5.1: target for configuration [library] is up to date.
  Up-to-date vibe-d:mail 0.10.3: target for configuration [library] is up to date.
  Up-to-date vibe-d:mongodb 0.10.3: target for configuration [library] is up to date.
  Up-to-date vibe-d:redis 0.10.3: target for configuration [library] is up to date.
  Up-to-date vibe-d:utils 0.10.3: target for configuration [library] is up to date.
  Up-to-date vibe-d:web 0.10.3: target for configuration [library] is up to date.
  Up-to-date vibe-d 0.10.3: target for configuration [library] is up to date.
    Building hello ~master: building configuration [application]
Compiling Diet HTML template hello.html...
     Linking hello
    Finished To force a rebuild of up-to-date targets, run again with --force
     Running hello 
Listening for requests on http://[::1]:8080/
Listening for requests on http://127.0.0.1:8080/
Please open http://127.0.0.1:8080/ in your browser.
```

This time around, you notice that the required libraries were no longer downloaded so the compilation is a bit faster. Refresh your browser and you should see the new message.

<figure><img src="https://3936448450-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FjGPCKHCWMHsDLNzX2hV8%2Fuploads%2FPoLWUkrMc2zpwajuVlp3%2Fimage133.png?alt=media&amp;token=87203fae-654c-443e-84e1-e5ed71dbd56a" alt=""><figcaption></figcaption></figure>

To stop the running app, press Ctrl-C (maybe twice).

As you have noticed, this is the conventional directory layout of a Vibe.d app:

**\source**      - your D code should reside here

**\views**         - the HTML or template pages stay here

**\public**        - for other files such as CSS, scripts, images, videos, etc.
