https://fastro.dev/static/image.png author: Fastro date: 07/06/2023
title: βGet started, hello world!β description: We will create a SSR web application with one page and returning very simple react component. image: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