By @ehiber and contributors at 4Geeks Academy
Estas instrucciones estan disponibles en espanol.
Start coding a TypeScript/HTML/CSS website in 30 seconds by opening this template using 4Geeks' One-Click Coding or locally on your computer.
Install the packages by typing:
npm installType on the command line:
npm run startThen open your local URL in the browser (usually http://localhost:5173).
Run the same development server:
npm run startVite is configured to listen on 0.0.0.0, so Codespaces can detect and forward port 5173 automatically.
Use this command to validate only TypeScript without starting Vite:
npm run typecheckIf you want to execute ./src/main.ts directly and see console.log output in the terminal, run:
npm run consoleThis command is already wired to ./src/main.ts.
It depends on the language:
./src/main.tsfor TypeScript logic../src/style.cssfor styles (Tailwind CSS v4 is already imported)../index.htmlfor the HTML shell.
You can add more files as needed, just make sure to import them from main.ts.
Note: if you can see the "Hello Rigo" card and the message "If you can see this, Tailwind is working.", Tailwind is configured correctly.
Every time you change any file inside ./src, the website refreshes automatically (hot reload).
If changes still don't appear, refresh clearing cache:
- Mac:
Cmd + Shift + R - Windows/Linux:
Ctrl + Shift + R
Add them inside ./public and reference them in HTML using /your-image-name.ext.
Example:
<img src="/rigo-baby.jpg" alt="Rigo" />Add files into ./src and import them from main.ts.
Example:
import { myVar } from "./file2";This boilerplate is compatible with Vercel in one step.
This template was built as part of the 4Geeks Academy Coding Bootcamp by ehiber and contributors. Find out more about our AI Engineering Course, Full Stack Developer Course, and Data Science Bootcamp.
You can find other templates and resources like this at the school's GitHub page.