forked from Chewing_Bever/rusty-bever
Tried to add MirageJS but failed
This commit is contained in:
parent
6d83c18036
commit
548dd0d022
8 changed files with 681 additions and 373 deletions
19
web/src/components/MirageTest.svelte
Normal file
19
web/src/components/MirageTest.svelte
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
<script lang="ts">
|
||||
|
||||
console.log("sup");
|
||||
let movies = [];
|
||||
|
||||
fetch("/api/movies").then(res => res.json()).then(res => {
|
||||
movies = res;
|
||||
console.log(movies);
|
||||
});
|
||||
|
||||
</script>
|
||||
|
||||
<ul>
|
||||
{#each movies as { id, name, year }, i}
|
||||
<li><a target="_blank" href="https://www.youtube.com/watch?v={id}">
|
||||
{i + 1}: {name} - {year}
|
||||
</a></li>
|
||||
{/each}
|
||||
</ul>
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
<script>
|
||||
<script lang="ts">
|
||||
let count = 0;
|
||||
|
||||
function add() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue