Version: v0.7.0 - Beta.  We welcome contributors & feedback.

Hello World

This tutorial will show you how to add a basic page to your THT app.

Setup 

We assume you have set up the starter app.

Page URLs 

To create a new page, just add a .tht file to the code/pages directory.

Each page file automatically gets a clean lower-case URL.

For example:

File URL
code/pages/myBlog.tht /my-blog
code/pages/help/contactUs.tht /help/contact-us
code/pages/eventCalendar/thisWeekend.tht /event-calendar/this-weekend

Step 1: Create the Page 

Create a new file with this line of code:

print('Hello World!')

Then save the file as:

  code/pages/helloWorld.tht   (upper-case 'W'!)

Step 2: Load the Page 

Load this URL: http://localhost:3333/hello-world

Here’s what you should see:

Hello World!