Skip to main content
Module

x/fastro/posts/start.md

Fast and simple web application framework for deno
Go to Latest
File

title: “Get started, hello world!” description: We will create a SSR web application with one page and returning very simple react component. image: https://fastro.dev/static/image.png author: Fastro date: 07/06/2023

Prerequisites

Make sure you have Deno installed. This is required to run JS and TS code. With the --version argument below, you will know what version is installed.

Execute this command:

deno --version

You will see the response


deno 1.35.0 (release, x86_64-apple-darwin)
v8 11.6.189.7
typescript 5.1.6

If it hasn’t been installed properly, please follow the detailed installation steps here: Installation.

Let’s start coding

Okay, after deno installed to your computer, this is the perfect time to play. Create a folder for your project and enter to it.

mkdir my-project && cd my-project

Generate default project from command line.

deno run -A -r https://fastro.deno.dev

Above command will generate default folders and files you can use for initial project.

Please note, the -A argument allows deno to access all permissions, and -r argument is to reload source code cache (recompile TypeScript).


.
├── .github
│   └── workflows
│       └── build.yml
├── .vscode
│   └── settings.json
├── deno.json
├── main.ts
├── pages
│   └── app.tsx
└── readme.md

Now let’s run the application

deno task start

If there is no problem, you will see this message on the terminal

Listening on http://localhost:8000

Open that link on your browser or hit them via curl

curl http://localhost:8000