diff options
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 |
