valerio
How can nuxt use a stage name in its url? Im using AWS apigateway,
How can nuxt use a stage name in its url? Im using AWS apigateway, so a stage name, like
/prod
is appended at the end of the base URL. The nuxt app is not working and giving errors like:
...amazonaws.com/_nuxt/GlKMZ6mC.js
is not found. Thats because it should be ...amazonaws.com/_nuxt/prod/GlKMZ6mC.js
5 replies
How do you watch for body change in usefetch?
<script setup>
const usersByLastName = reactive <UsersByLastName> ({ lastName: "" });
const { data, pending, error } = useFetch("/api/users/bylastname", {
method: "POST",
body: usersByLastName,
});
</script>
<template>
<input v-model="usersByLastName.lastName" />
<div v-if="pending">Caricamento...</div>
<div v-if="error">Errore: {{ error }}</div>
<div v-if="data">
<ul>
<li v-for="user in data.users">
{{ user.firstName }} {{user.lastName}}
</li>
</ul>
</div>
</template>
5 replies