Skip to content
This repository has been archived by the owner on Nov 12, 2024. It is now read-only.

Convert first workshop from git to replit #485

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions FASTN.ftd
Original file line number Diff line number Diff line change
Expand Up @@ -1065,3 +1065,5 @@ skip: true
/linkedin/ -> https://www.linkedin.com/company/fastn-stack/
/r/counter/ -> https://replit.com/@ajit6/counter/
/r/acme/ -> https://replit.com/@ayushipujaa/acme/
/r/workshop/a/01/ -> https://replit.com/@ayushipujaa/a-website01-hello-world/?embed=true
/r/final/workshop/a/01/ -> https://replit.com/@ayushipujaa/a-website01-hello-worldfinal/?embed=true
90 changes: 20 additions & 70 deletions workshop/01-hello-world.ftd
Original file line number Diff line number Diff line change
Expand Up @@ -2,84 +2,25 @@

-- ds.page: Hello World - `fastn` Hands-On Workshop

This is first step in the [`fastn` Hands On Workshop](/workshop/). In this we
will install fastn on your machine, and run `fastn`.
This is first step in the [`fastn` Hands On Workshop](/workshop/).

-- ds.h1: Install `fastn`
Let's first print `hello world` using `fastn`. There are two files as you see
below:

`fastn` can be quickly installed on MacOS, Linux and Windows.
- `index.ftd`
- `FASTN.ftd`

-- ds.h2: On Mac/Linux
Lets first fork the below repl and then we'll go through the instruction
narrated below and update the files to print `hello world`.

-- ds.code: Installer Script for Mac/Linux
lang: sh

source <(curl -fsSL https://fastn.com/install.sh)

-- ds.markdown:

If you see the Help text of the fastn command, it confirms that `fastn` is
successfully installed.

-- ds.h2: On Windows

- Download the setup named `fastn_setup.exe`
from the [Releases](https://github.com/fastn-stack/fastn/releases/latest) page

- Run the setup and follow the installation steps

- Once the setup is complete, you will have `fastn` installed in your system

To verify, open command prompt and execute the command, `fastn`

-- ds.image:
src: $fastn-assets.files.images.setup.fastn-terminal-windows.png
width: fill-container

-- ds.markdown:

If you see the Help text of the fastn command, it confirms that `fastn` is
successfully installed.


-- ds.h1: Run `fastn`

**Clone the [`workshop`](https://github.com/fastn-stack/workshop) repository**

-- ds.image:
src: $fastn-assets.files.images.workshop.clone-workshop-repo.png
-- ftd.iframe:
src: /r/workshop/a/01/
width: fill-container

-- ds.markdown:

- On GitHub, click on the `Code` and copy the HTTPS `.git` URL
- Open Terminal/command prompt and change the directory to desktop, for easy
access
- Paste or type the below code to clone the repository

-- ds.code:

git clone https://github.com/fastn-stack/workshop.git

-- ds.markdown:

Now, change the directory to the first folder `01-hello-world` through terminal.

Run the following command to run a local server:

-- ds.code:

fastn serve

-- ds.markdown:

- Copy the URL and run it on your web-browser.

An empty page will be opened as the `index.ftd` is commented out.
height.fixed.px: 300

-- ds.h1: Update `index.ftd`

- In the [`index.ftd`](https://github.com/fastn-stack/workshop/blob/main/01-hello-world/index.ftd) file, uncomment the line #9
- In the [`index.ftd`](/r/workshop/a/01/#index.ftd) file, uncomment the line #2

-- ds.image:
src: $fastn-assets.files.images.workshop.uncommented-index.png
Expand All @@ -92,6 +33,15 @@ width: fill-container

With just one line of code in `fastn` you can print a text in the browser.

The final output look like this.

-- ftd.iframe:
src: /r/final/workshop/a/01/
width: fill-container
height.fixed.px: 300

-- ds.markdown:

Go to the [second step](/workshop/add-quote/).

-- end: ds.page