diff options
| author | Guillermo Serrahima <dev@vylion.com> | 2026-02-19 12:18:34 +0100 |
|---|---|---|
| committer | Guillermo Serrahima <dev@vylion.com> | 2026-02-19 12:18:34 +0100 |
| commit | b8614b16e958cbacfff05a8e2f79f8e4410654b8 (patch) | |
| tree | 68d89f394ff5f34259e59af76cc4e6408a6e392a /frontend/src/main.ts | |
| parent | f81aae44181222a2792d6a91c1506075969a81e8 (diff) | |
| download | llostre-b8614b16e958cbacfff05a8e2f79f8e4410654b8.tar.xz llostre-b8614b16e958cbacfff05a8e2f79f8e4410654b8.zip | |
added frontend (vanilla-ts with bun)
Diffstat (limited to 'frontend/src/main.ts')
| -rw-r--r-- | frontend/src/main.ts | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/frontend/src/main.ts b/frontend/src/main.ts new file mode 100644 index 0000000..3628147 --- /dev/null +++ b/frontend/src/main.ts @@ -0,0 +1,35 @@ +import './style.css' +/* +import typescriptLogo from './typescript.svg' +import viteLogo from '/vite.svg' +import { setupCounter } from './counter.ts' +*/ + +const response = await fetch('http://localhost:8080/'); +const text = await response.text(); +const app = document.querySelector('#app'); +if (app) { + app.innerHTML = text; +} + +/* +document.querySelector<HTMLDivElement>('#app')!.innerHTML = ` + <div> + <a href="https://vite.dev" target="_blank"> + <img src="${viteLogo}" class="logo" alt="Vite logo" /> + </a> + <a href="https://www.typescriptlang.org/" target="_blank"> + <img src="${typescriptLogo}" class="logo vanilla" alt="TypeScript logo" /> + </a> + <h1>Vite + TypeScript</h1> + <div class="card"> + <button id="counter" type="button"></button> + </div> + <p class="read-the-docs"> + Click on the Vite and TypeScript logos to learn more + </p> + </div> +` + +setupCounter(document.querySelector<HTMLButtonElement>('#counter')!) +*/
\ No newline at end of file |
