Skip to content
This repository has been archived by the owner on Oct 9, 2022. It is now read-only.

Commit

Permalink
misc improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
sanity committed Dec 19, 2018
1 parent b76b01b commit 3ed5116
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions gettingstarted.rst
Original file line number Diff line number Diff line change
Expand Up @@ -32,3 +32,32 @@ You can find the LATEST_VERSION of Kweb on `JitPack <https://jitpack.io/#kwebio/
Hello world
-----------

Type this and run it:

.. code-block:: kotlin
import io.kweb.*
import io.kweb.dom.element.*
fun main() {
Kweb(port = 8091) {
doc.body.new {
h1().text("Hello World!")
}
}
}
Visit http://localhost:8091/ in your web browser and you should see the traditional greeting, translating to the
following HTML body:

.. code-block:: html

<body>
<h1>Hello World!</h1>
</body>

This simple example already illustrates some important features of Kweb:

* Getting a kwebsite up and running is a breeze, no messing around with servlets, or third party webservers

* Your Kweb code will loosely mirror the structure of your page HTML

0 comments on commit 3ed5116

Please sign in to comment.