THT is in early Beta. We welcome contributors & feedback.

Get Started  (10 Minutes)

Requirements 

Beta Version 

The current version is v0.1.4 - Beta.

It is intended for curious early adopters who have some programming experience.

Please send feedback & bug reports to help us make it better!

Command Line 

These steps will take place in the command line interface.

Step 1: Install THT 

This command will install THT in your user directory.

$ curl -s -o tht.sh https://tht.help/install && source tht.sh

Step 2: Go to the Document Root 

The Document Root directory is for files that can be accessed directly by visitors, like images.

THT uses this directory as a reference point, but it installs your app outside of the Document Root for extra security.

→ Choose one (A or B):
A)  If you are running Apache...

Change cd to your Document Root directory.

(Check your documentation — it is sometimes called 'htdocs' or 'public_html'.)

Example:

$ cd ~/web/yoursite.com/public_html
B)  If you are working on your local machine...

You will need to create a new directory for your app, and a Document Root (e.g. 'public') inside of it.

Then cd into the Document Root.

Example (substitute 'myapp' with a lower-case name for your app):

$ mkdir -p ~/myapp/public
$ cd ~/myapp/public

Step 3: Create a New App 

From inside your Document Root, run this:

$ tht new

Here’s what you’ll see before you confirm:

+-------------------+
|      NEW APP      |
+-------------------+

Your Document Root is:
  /Users/yourname/myapp/public

Is this correct? (y/N)? y

Step 4: Load the Starter App 

There is now an tht folder next to your Document Root, which contains a starter app that you can build on.

→ Choose one (A or B):
A)  If you are running Apache on a remote server...

Just load the app directly in your browser:

  • e.g. http://yoursite.com
B)  If you are working on your local machine...

You can host your app with the built-in test server.

From inside your Document Root, run this:

$ tht server

Here’s what you’ll see:

+-------------------+
|    TEST SERVER    |
+-------------------+

App directory:
  /Users/yourname/myapp

Serving app at:
  http://localhost:8888

Press [Ctrl-C] to stop.

NoteThe test server is great for development, but you will need to use a full web server, like Apache, to host the final app.

Great! 

Here’s what you should see when you run the starter app:

Hello World

Congratulations! The hard part is over.

Next Steps 

See How to Create a Basic Web App