Hello World

In this part we will install fastn on your machine and create a hello world FTD program.

The name of package manager for FTD language is fastn.

We will begin by installing fastn on your machine. Install fastn.

You can open installation page in a new tab, and follow the instructions. You can continue this course after installing fastn.

Let’s create our Hello World program

Let’s create a fastn package and start coding Hello World.
ℹ️
What is fastn package?

fastn package is a folder that requires atleast two files

  • FASTN.ftd
  • index.ftd
There can be any number of .ftd file but these two files are essential.

Create a new folder and rename it as expander, anywhere in your machine. Let’s say in your Desktop folder.

Open the newly created folder in any text editor. We recommend Sublime Text or VS Code for working with FTD.

Open the folder and add two new files, FASTN.ftd and index.ftd to create the fastn package.

FASTN.ftd

It is a special file which keeps package configuration related data like

  • package name
  • package dependencies
  • sitemap, etc
Import the special library, fastn
Import fastn
-- import: fastn
Lang:
ftd
Then, we create a new fastn package after giving line-space
Create a fastn package
-- fastn.package: <project-name>
Lang:
ftd

index.ftd

To print Hello World, we are using ftd.text section
Code
-- ftd.text: Hello World
Lang:
ftd

Create a local server and run the URL in the web-browser to see the text displayed.

Make sure that the directory points to the expander folder you created.
Terminal command to create local server
fastn serve
Lang:
ftd

Using just one line code, we displayed the Hello Worlds.

You have successfully completed the Part 1.

Continue with the part 2 now.

Support fastn!

Enjoying fastn? Please consider giving us a star ⭐️ on GitHub to show your support!

Getting Help

Have a question or need help?

Visit our GitHub Q&A discussion to get answers and subscribe to it to stay tuned.

Join our Discord channel and share your thoughts, suggestion, question etc.

Connect with our community!

Found an issue?

If you find some issue, please visit our GitHub issues to tell us about it.

Join us

We welcome you to join our Discord community today.

We are trying to create the language for human beings and we do not believe it would be possible without your support. We would love to hear from you.
Copyright © 2023 - FifthTry.com